diff options
author | Dan Eicher <dan@eu.phorio.us> | 2013-04-07 01:48:39 +0400 |
---|---|---|
committer | Dan Eicher <dan@eu.phorio.us> | 2013-04-07 01:48:39 +0400 |
commit | 89863f78a90464e2ada35ecf0888cc7870828707 (patch) | |
tree | ed66f1de9fefa3f30cbfa3ca3f1ccf8a47e18d91 /source | |
parent | c3725021ab3b384557dd8f718aa7e378a5eeeef0 (diff) |
Whoops, revert r55854 and use r48292 as is
Turns out outliner_search_back() doesn't always return a valid scene...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index afc23efef55..3f06db22f59 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -206,10 +206,11 @@ static int tree_element_set_active_object(bContext *C, Scene *scene, SpaceOops sce = (Scene *)outliner_search_back(soops, te, ID_SCE); if (sce && scene != sce) { ED_screen_set_scene(C, CTX_wm_screen(C), sce); + scene = sce; } /* find associated base in current scene */ - base = BKE_scene_base_find(sce, ob); + base = BKE_scene_base_find(scene, ob); if (base) { if (set == 2) { @@ -221,22 +222,22 @@ static int tree_element_set_active_object(bContext *C, Scene *scene, SpaceOops } else { /* deleselect all */ - BKE_scene_base_deselect_all(sce); + BKE_scene_base_deselect_all(scene); ED_base_object_select(base, BA_SELECT); } if (recursive) { /* Recursive select/deselect for Object hierarchies */ - do_outliner_object_select_recursive(sce, ob, (ob->flag & SELECT) != 0); + do_outliner_object_select_recursive(scene, ob, (ob->flag & SELECT) != 0); } if (C) { ED_base_object_activate(C, base); /* adds notifier */ - WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, sce); + WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); } } - if (ob != sce->obedit) + if (ob != scene->obedit) ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); return 1; |