diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-31 18:55:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-01-31 20:01:47 +0300 |
commit | a37e889aebde18c130b1a9285219f03eed95a23d (patch) | |
tree | 932b03765a3834a830e62fdaedf510cae40212e1 | |
parent | 5c5de14ad70d14c05b63602a946a6e72a45d6a4f (diff) |
Fix T61013: changing top/status bar editor type can be changed with shortcut.
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 8736664d23c..325e69c2ea0 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -4705,6 +4705,12 @@ static void SCREEN_OT_region_blend(wmOperatorType *ot) /** \name Space Type Set or Cycle Operator * \{ */ +static bool space_type_set_or_cycle_poll(bContext *C) +{ + ScrArea *sa = CTX_wm_area(C); + return (sa && !ELEM(sa->spacetype, SPACE_TOPBAR, SPACE_STATUSBAR)); +} + static int space_type_set_or_cycle_exec(bContext *C, wmOperator *op) { const int space_type = RNA_enum_get(op->ptr, "space_type"); @@ -4753,7 +4759,7 @@ static void SCREEN_OT_space_type_set_or_cycle(wmOperatorType *ot) /* api callbacks */ ot->exec = space_type_set_or_cycle_exec; - ot->poll = ED_operator_areaactive; + ot->poll = space_type_set_or_cycle_poll; ot->flag = 0; |