GP Copy/Paste Fix: Paste button doesn't update after copying strokes using Ctrl-C
authorJoshua Leung <aligorith@gmail.com>
Wed, 7 Jun 2017 07:07:57 +0000 (19:07 +1200)
committerJoshua Leung <aligorith@gmail.com>
Wed, 7 Jun 2017 15:23:29 +0000 (03:23 +1200)
source/blender/editors/gpencil/gpencil_edit.c

index f2a0476a9e706c736b017dcd8475e9e20ac43ee2..c90faba3761ec6b9e871a238a728dd1ff6e716c8 100644 (file)
@@ -416,7 +416,10 @@ static int gp_strokes_copy_exec(bContext *C, wmOperator *op)
        }
        CTX_DATA_END;
        
-       /* done - no updates needed */
+       /* updates (to ensure operator buttons are refreshed, when used via hotkeys) */
+       WM_event_add_notifier(C, NC_GPENCIL | ND_DATA, NULL); // XXX?
+       
+       /* done */
        return OPERATOR_FINISHED;
 }