From b00d971efe67799042577cf0391bb34e9f870835 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 25 Apr 2018 07:52:40 +0200 Subject: UI: Apply remove redo region This was a disabled part of the top-bar merge (code by @Severin) The only change made is to move to redo UI into a popover. --- source/blender/editors/undo/ed_undo.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'source/blender/editors/undo') diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c index 03dd1ad26e7..3950b056e89 100644 --- a/source/blender/editors/undo/ed_undo.c +++ b/source/blender/editors/undo/ed_undo.c @@ -304,7 +304,6 @@ void ED_OT_undo_redo(wmOperatorType *ot) /** \} */ -#ifdef WITH_REDO_REGION_REMOVAL struct OperatorRepeatContextHandle { ScrArea *restore_area; ARegion *restore_region; @@ -334,7 +333,6 @@ void ED_operator_repeat_reset_context(bContext *C, const OperatorRepeatContextHa CTX_wm_area_set(C, context_info->restore_area); CTX_wm_region_set(C, context_info->restore_region); } -#endif /* -------------------------------------------------------------------- */ /** \name Operator Repeat @@ -350,17 +348,8 @@ int ED_undo_operator_repeat(bContext *C, wmOperator *op) wmWindowManager *wm = CTX_wm_manager(C); struct Scene *scene = CTX_data_scene(C); -#ifdef WITH_REDO_REGION_REMOVAL const OperatorRepeatContextHandle *context_info; context_info = ED_operator_repeat_prepare_context(C, op); -#else - /* keep in sync with logic in view3d_panel_operator_redo() */ - ARegion *ar = CTX_wm_region(C); - ARegion *ar1 = BKE_area_find_region_active_win(CTX_wm_area(C)); - - if (ar1) - CTX_wm_region_set(C, ar1); -#endif if ((WM_operator_repeat_check(C, op)) && (WM_operator_poll(C, op->type)) && @@ -406,12 +395,7 @@ int ED_undo_operator_repeat(bContext *C, wmOperator *op) } } -#ifdef WITH_REDO_REGION_REMOVAL ED_operator_repeat_reset_context(C, context_info); -#else - /* set region back */ - CTX_wm_region_set(C, ar); -#endif } else { CLOG_WARN(&LOG, "called with NULL 'op'"); -- cgit v1.2.3