Fix T61013: changing top/status bar editor type can be changed with shortcut.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user