Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-27 01:29:34 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-27 01:34:24 +0300
commitd525c76003b3e7dcda92df09e9009c2f67f5532e (patch)
tree0ea88951ec28b25cdd25d6ba3bb71af4fb21f322 /source/blender/editors/screen
parentd59538228886e5aaba13f04b27d99e5b78b241e8 (diff)
Revert "UI: Edit Menu Operator Polling"
This reverts part of commit b7eba20236ca6499a62a8ee2b0c852086bc46b8e. Polling is causing issues in scripts, and the minor usability improvements are not worth the extra work this may cause at this point in the release cycle. Fixes T65149
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/screen_ops.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index a94c0e35876..af90bbc9975 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -3564,12 +3564,6 @@ static int repeat_last_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
}
-static bool repeat_last_poll(bContext *C)
-{
- wmWindowManager *wm = CTX_wm_manager(C);
- return ED_operator_screenactive(C) && !BLI_listbase_is_empty(&wm->operators);
-}
-
static void SCREEN_OT_repeat_last(wmOperatorType *ot)
{
/* identifiers */
@@ -3580,7 +3574,7 @@ static void SCREEN_OT_repeat_last(wmOperatorType *ot)
/* api callbacks */
ot->exec = repeat_last_exec;
- ot->poll = repeat_last_poll;
+ ot->poll = ED_operator_screenactive;
}
/** \} */
@@ -3633,12 +3627,6 @@ static int repeat_history_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static bool repeat_history_poll(bContext *C)
-{
- wmWindowManager *wm = CTX_wm_manager(C);
- return ED_operator_screenactive(C) && !BLI_listbase_is_empty(&wm->operators);
-}
-
static void SCREEN_OT_repeat_history(wmOperatorType *ot)
{
/* identifiers */
@@ -3650,7 +3638,7 @@ static void SCREEN_OT_repeat_history(wmOperatorType *ot)
ot->invoke = repeat_history_invoke;
ot->exec = repeat_history_exec;
- ot->poll = repeat_history_poll;
+ ot->poll = ED_operator_screenactive;
RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "", 0, 1000);
}
@@ -3672,12 +3660,6 @@ static int redo_last_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *
return OPERATOR_CANCELLED;
}
-static bool redo_last_poll(bContext *C)
-{
- wmWindowManager *wm = CTX_wm_manager(C);
- return ED_operator_screenactive(C) && !BLI_listbase_is_empty(&wm->operators);
-}
-
static void SCREEN_OT_redo_last(wmOperatorType *ot)
{
/* identifiers */
@@ -3688,7 +3670,7 @@ static void SCREEN_OT_redo_last(wmOperatorType *ot)
/* api callbacks */
ot->invoke = redo_last_invoke;
- ot->poll = redo_last_poll;
+ ot->poll = ED_operator_screenactive;
}
/** \} */