Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-10-20 22:08:22 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-10-20 22:14:44 +0400
commitabb266973d45c1a97e5734176662ead99e97a9da (patch)
treec8597cd46ecb4c070a54c4b512c738d87f09a619
parent50cb62a3a095f4ea53b0f28175423f993d511d6e (diff)
Fix T42311, too many paint slots added.
Don't allow the add paint slot operator to redo. Also guard better against excessive slot addition
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 1af4890e229..791c1b3ada1 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -5086,9 +5086,8 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op)
ima = mtex->tex->ima = proj_paint_image_create(op, bmain);
}
- WM_event_add_notifier(C, NC_TEXTURE, CTX_data_scene(C));
+ WM_event_add_notifier(C, NC_TEXTURE | NA_ADDED, mtex->tex);
}
- WM_event_add_notifier(C, NC_TEXTURE | NA_ADDED, mtex->tex);
}
if (ima) {
@@ -5160,7 +5159,7 @@ void PAINT_OT_add_texture_paint_slot(wmOperatorType *ot)
ot->poll = ED_operator_region_view3d_active;
/* flags */
- ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
+ ot->flag = OPTYPE_UNDO;
/* properties */
prop = RNA_def_enum(ot->srna, "type", layer_type_items, 0, "Type", "Merge method to use");