Fix #23869: outliner not updated correctly/instantly
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 17 Sep 2010 06:52:48 +0000 (06:52 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 17 Sep 2010 06:52:48 +0000 (06:52 +0000)
Added ND_OB_SELECT notifier to separate operator. Selected objects
aren't actually changing, but there is no existing ND which could be used
for outliner update.

source/blender/editors/mesh/editmesh.c
source/blender/editors/space_outliner/space_outliner.c

index e6ba228c260a35af696dd6419a7922584577445e..ff2fad3f551cd2e487bb2192eebdb62e6a2a6aa2 100644 (file)
@@ -1526,6 +1526,11 @@ static int mesh_separate_exec(bContext *C, wmOperator *op)
           
        if(retval) {
                WM_event_add_notifier(C, NC_GEOM|ND_DATA, base->object->data);
+
+               // XXX: new object was created, but selection wasn't actually changed
+               //      need this for outliner update without adding new ND. nazgul.
+               WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene);
+
                return OPERATOR_FINISHED;
        }
        return OPERATOR_CANCELLED;
index d3db64d6d031ab963469cccea9f986c02df7aa9d..1a46c32713e2911626d9141cd1b2b8f3de45a369 100644 (file)
@@ -120,6 +120,7 @@ static void outliner_main_area_listener(ARegion *ar, wmNotifier *wmn)
                                                ED_region_tag_redraw(ar);
                                        break;
                        }
+                       break;
                case NC_GROUP:
                        /* all actions now, todo: check outliner view mode? */
                        ED_region_tag_redraw(ar);