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-06-14 22:55:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-14 22:58:11 +0300
commit1adfabc8c62ed3f067d209511ce3d868e76c9bbd (patch)
tree74b47e4c8fd86eb673b65a6dbf85ca51e1f89e4c /source/blender/editors/space_topbar
parent7afa59e37a539174385d8a2484e2b17ae43e0a85 (diff)
WM: revert part of Top-Bar inclusion
This removes OperatorRepeatContextHandle, from 5f6c45498c92b since we now only have redo in the area an operator is executed in. These values could be invalid and crashed in some cases.
Diffstat (limited to 'source/blender/editors/space_topbar')
-rw-r--r--source/blender/editors/space_topbar/space_topbar.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/source/blender/editors/space_topbar/space_topbar.c b/source/blender/editors/space_topbar/space_topbar.c
index 4342fa87f89..c7ef6591c0d 100644
--- a/source/blender/editors/space_topbar/space_topbar.c
+++ b/source/blender/editors/space_topbar/space_topbar.c
@@ -57,9 +57,6 @@
#include "WM_types.h"
#include "WM_message.h"
-
-void topbar_panels_register(ARegionType *art);
-
/* ******************** default callbacks for topbar space ***************** */
static SpaceLink *topbar_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
@@ -277,64 +274,9 @@ void ED_spacetype_topbar(void)
art->layout = ED_region_header_layout;
art->draw = ED_region_header_draw;
- /* For popovers. */
- topbar_panels_register(art);
-
BLI_addhead(&st->regiontypes, art);
recent_files_menu_register();
BKE_spacetype_register(st);
}
-
-
-/* -------------------------------------------------------------------- */
-/** \name Redo Panel
- * \{ */
-
-static int topbar_panel_operator_redo_poll(const bContext *C, PanelType *UNUSED(pt))
-{
- wmOperator *op = WM_operator_last_redo(C);
- if (op == NULL) {
- return 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)
-{
- wmOperator *op = WM_operator_last_redo(C);
- if (op == NULL) {
- return;
- }
- if (!WM_operator_check_ui_enabled(C, op->type->name)) {
- uiLayoutSetEnabled(pa->layout, false);
- }
- uiLayout *col = uiLayoutColumn(pa->layout, false);
- uiTemplateOperatorRedoProperties(col, C);
-}
-
-void topbar_panels_register(ARegionType *art)
-{
- PanelType *pt;
-
- pt = MEM_callocN(sizeof(PanelType), __func__);
- strcpy(pt->idname, "TOPBAR_PT_redo");
- strcpy(pt->label, N_("Redo"));
- strcpy(pt->translation_context, BLT_I18NCONTEXT_DEFAULT_BPYRNA);
- pt->draw = topbar_panel_operator_redo;
- pt->poll = topbar_panel_operator_redo_poll;
- pt->space_type = SPACE_TOPBAR;
- pt->region_type = RGN_TYPE_HEADER;
- BLI_addtail(&art->paneltypes, pt);
-}
-
-/** \} */