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:
-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)