From a37e889aebde18c130b1a9285219f03eed95a23d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 31 Jan 2019 16:55:04 +0100 Subject: Fix T61013: changing top/status bar editor type can be changed with shortcut. --- source/blender/editors/screen/screen_ops.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3