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:
authorCampbell Barton <ideasman42@gmail.com>2018-05-02 12:33:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-02 12:33:24 +0300
commit31d5fcd2a7271568b1f70713267185c4601c7f41 (patch)
tree60abb41884e07f81ae0268b5e201b387d0250446 /source/blender/editors/space_topbar
parent85dcdb87d2ee91844e1dc343b8bd48ace2717d77 (diff)
UI: run redo poll check in operators context
Diffstat (limited to 'source/blender/editors/space_topbar')
-rw-r--r--source/blender/editors/space_topbar/space_topbar.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/space_topbar/space_topbar.c b/source/blender/editors/space_topbar/space_topbar.c
index 4c40353618b..8cf27d86cfe 100644
--- a/source/blender/editors/space_topbar/space_topbar.c
+++ b/source/blender/editors/space_topbar/space_topbar.c
@@ -45,6 +45,7 @@
#include "ED_screen.h"
#include "ED_space_api.h"
+#include "ED_undo.h"
#include "UI_interface.h"
#include "UI_resources.h"
@@ -297,8 +298,14 @@ static int topbar_panel_operator_redo_poll(const bContext *C, PanelType *UNUSED(
return false;
}
- return (WM_operator_poll((bContext *)C, op->type) &&
- WM_operator_check_ui_empty(op->type) == false);
+ bool success = false;
+ if (!WM_operator_check_ui_empty(op->type)) {
+ const OperatorRepeatContextHandle *context_info;
+ context_info = ED_operator_repeat_prepare_context((bContext *)C, op);
+ success = WM_operator_poll((bContext *)C, op->type);
+ ED_operator_repeat_reset_context((bContext *)C, context_info);
+ }
+ return success;
}
static void topbar_panel_operator_redo(const bContext *C, Panel *pa)