[Bf-blender-cvs] [26f4f7e] master: Final UI messages fixes (for this session...).

Bastien Montagne noreply at git.blender.org
Thu Aug 18 15:20:27 CEST 2016


Commit: 26f4f7edcab2896c8afec30d0431044b237c8ed6
Author: Bastien Montagne
Date:   Wed Aug 17 21:46:38 2016 +0200
Branches: master
https://developer.blender.org/rB26f4f7edcab2896c8afec30d0431044b237c8ed6

Final UI messages fixes (for this session...).

===================================================================

M	source/blender/editors/gpencil/gpencil_data.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 876f873..8733c7b 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -1439,8 +1439,8 @@ static int gp_brush_remove_exec(bContext *C, wmOperator *op)
 	if (ELEM(NULL, ts, brush))
 		return OPERATOR_CANCELLED;
 
-	if (BLI_listbase_count(&ts->gp_brushes) < 2) {
-		BKE_report(op->reports, RPT_ERROR, "Grease Pencil needs a brush. Unable to delete brush");
+	if (BLI_listbase_count_ex(&ts->gp_brushes, 2) < 2) {
+		BKE_report(op->reports, RPT_ERROR, "Grease Pencil needs a brush, unable to delete the last one");
 		return OPERATOR_CANCELLED;
 	}
 
@@ -1466,7 +1466,7 @@ static int gp_brush_remove_exec(bContext *C, wmOperator *op)
 void GPENCIL_OT_brush_remove(wmOperatorType *ot)
 {
 	/* identifiers */
-	ot->name = "Remove brush";
+	ot->name = "Remove Brush";
 	ot->idname = "GPENCIL_OT_brush_remove";
 	ot->description = "Remove active Grease Pencil drawing brush";
 
@@ -1797,8 +1797,8 @@ static int gp_palette_remove_exec(bContext *C, wmOperator *op)
 	if (ELEM(NULL, gpd, palette))
 		return OPERATOR_CANCELLED;
 
-	if (BLI_listbase_count(&gpd->palettes) < 2) {
-		BKE_report(op->reports, RPT_ERROR, "Grease Pencil needs a palette. Unable to delete palette");
+	if (BLI_listbase_count_ex(&gpd->palettes, 2) < 2) {
+		BKE_report(op->reports, RPT_ERROR, "Grease Pencil needs a palette, unable to delete the last one");
 		return OPERATOR_CANCELLED;
 	}




More information about the Bf-blender-cvs mailing list