diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-02-19 19:08:58 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-02-19 19:08:58 +0300 |
commit | d772c6ea315c5c34524aa3283ddc17eaf660798c (patch) | |
tree | 5d8134e3e76f419541c9e6d242b91f52db778c26 | |
parent | 1c0230b5739b9af5cf95019b590e64477389f134 (diff) |
Fix T74009: `bpy.ops.outliner.orphans_purge()` poll being too restrictive.
There is no reason to even require an editor at all here, for now just
kept the 'orphan view needed' condition for the outliner case only.
-rw-r--r-- | source/blender/editors/space_outliner/outliner_edit.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 1bdb68f49fe..5c5c5ade726 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -2177,17 +2177,11 @@ void OUTLINER_OT_keyingset_remove_selected(wmOperatorType *ot) static bool ed_operator_outliner_id_orphans_active(bContext *C) { ScrArea *sa = CTX_wm_area(C); - if (sa != NULL) { - if (sa->spacetype == SPACE_TOPBAR) { - return true; - } - - if (sa->spacetype == SPACE_OUTLINER) { - SpaceOutliner *so = CTX_wm_space_outliner(C); - return (so->outlinevis == SO_ID_ORPHANS); - } + if (sa != NULL && sa->spacetype == SPACE_OUTLINER) { + SpaceOutliner *so = CTX_wm_space_outliner(C); + return (so->outlinevis == SO_ID_ORPHANS); } - return 0; + return true; } /* Purge Orphans Operator --------------------------------------- */ |