Commit: 45c7af6c9cfdb50fabc1e5078cab7082e714af57
Author: Joshua Leung
Date:   Wed Jan 7 13:12:37 2015 +1300
Branches: master
https://developer.blender.org/rB45c7af6c9cfdb50fabc1e5078cab7082e714af57

Fix: Missing updates for UI panels and main region when using Grease Pencil in 
Image Editor

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

M       source/blender/editors/space_image/space_image.c

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

diff --git a/source/blender/editors/space_image/space_image.c 
b/source/blender/editors/space_image/space_image.c
index df78dfa..6cf5353 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -797,7 +797,9 @@ static void image_main_area_listener(bScreen *UNUSED(sc), 
ScrArea *sa, ARegion *
        /* context changes */
        switch (wmn->category) {
                case NC_GPENCIL:
-                       if (wmn->action == NA_EDITED)
+                       if (ELEM(wmn->action, NA_EDITED, NA_SELECTED))
+                               ED_region_tag_redraw(ar);
+                       else if (wmn->data & ND_GPENCIL_EDITMODE)
                                ED_region_tag_redraw(ar);
                        break;
                case NC_IMAGE:
@@ -860,6 +862,10 @@ static void image_buttons_area_listener(bScreen 
*UNUSED(sc), ScrArea *UNUSED(sa)
                case NC_NODE:
                        ED_region_tag_redraw(ar);
                        break;
+               case NC_GPENCIL:
+                       if (ELEM(wmn->action, NA_EDITED, NA_SELECTED))
+                               ED_region_tag_redraw(ar);
+                       break;
        }
 }
 
@@ -908,7 +914,7 @@ static void image_tools_area_listener(bScreen *UNUSED(sc), 
ScrArea *UNUSED(sa),
        /* context changes */
        switch (wmn->category) {
                case NC_GPENCIL:
-                       if (wmn->data == ND_DATA)
+                       if (wmn->data == ND_DATA || ELEM(wmn->action, 
NA_EDITED, NA_SELECTED))
                                ED_region_tag_redraw(ar);
                        break;
                case NC_BRUSH:

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to