Fix #25177: Skeleton Sketching - deleted sketches don't disappear immediately

Added notifier ND_SKETCH for handling such actions
This commit is contained in:
Sergey Sharybin
2010-12-12 16:15:49 +00:00
parent d47ef94d1a
commit 1185d70f8f
3 changed files with 3 additions and 0 deletions

View File

@@ -2456,6 +2456,7 @@ static int sketch_delete(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(ev
sk_deleteSelectedStrokes(sketch);
// allqueue(REDRAWVIEW3D, 0);
}
WM_event_add_notifier(C, NC_SCREEN|ND_SKETCH|NA_REMOVED, NULL);
return OPERATOR_FINISHED;
}

View File

@@ -703,6 +703,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
switch(wmn->data) {
case ND_GPENCIL:
case ND_ANIMPLAY:
case ND_SKETCH:
ED_region_tag_redraw(ar);
break;
case ND_SCREENBROWSE:

View File

@@ -172,6 +172,7 @@ typedef struct wmNotifier {
#define ND_GPENCIL (5<<16)
#define ND_EDITOR_CHANGED (6<<16) /*sent to new editors after switching to them*/
#define ND_SCREENSET (7<<16)
#define ND_SKETCH (8<<16)
/* NC_SCENE Scene */
#define ND_SCENEBROWSE (1<<16)