diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-05 04:32:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-05 04:32:24 +0300 |
commit | 974053f7e9443c71250c4c83f1a864c0f11bd473 (patch) | |
tree | 7b6424cf885b90ac09850d8bc9da4b3fd396592c /source/blender | |
parent | 57a93b4678bba2d3af831dd09f5b378605ebc54e (diff) |
Fix brush reset (missing notifier)
D2843 by @uvwxyz
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 4f6b3d100c5..2899cfeedcf 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -264,9 +264,14 @@ static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op)) if (!ob || !brush) return OPERATOR_CANCELLED; - if (ob->mode & OB_MODE_SCULPT) - BKE_brush_sculpt_reset(brush); /* TODO: other modes */ + if (ob->mode & OB_MODE_SCULPT) { + BKE_brush_sculpt_reset(brush); + } + else { + return OPERATOR_CANCELLED; + } + WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush); return OPERATOR_FINISHED; } |