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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-01 18:59:50 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-01 18:59:50 +0400
commit1701ebe5dcd1a2e40e9523e0388eb4acafe2ab1d (patch)
treeb246cd7cae22bb8048b8d86dc51a3065bdaeb116 /source/blender/editors/sculpt_paint
parentc8cf9415dede94971252b545bf97ca0b46be70d1 (diff)
Fix missing brush cursor redraw for texture paint when no pixels changed in the
image, no images need to be refreshed then but the cursors needs to be redrawn still. Otherwise it gets stuck, especially annoying in unexpected cases where the mask has reached the maximum for all pixels in the brush.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 7133585f41d..945fa14d613 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -255,6 +255,7 @@ static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode,
static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const wmEvent *event, const float mouse_in[2])
{
Scene *scene = CTX_data_scene(C);
+ ARegion *ar = CTX_wm_region(C);
Paint *paint = BKE_paint_get_active_from_context(C);
PaintMode mode = BKE_paintmode_get_active_from_context(C);
Brush *brush = BKE_paint_brush(paint);
@@ -324,6 +325,10 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const wmEve
RNA_float_set(&itemptr, "pressure", pressure);
stroke->update_step(C, stroke, &itemptr);
+
+ /* always redraw region if brush is shown */
+ if (ar && (paint->flags & PAINT_SHOW_BRUSH))
+ ED_region_tag_redraw(ar);
}
/* Returns zero if no sculpt changes should be made, non-zero otherwise */