Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_event_system.cc
| Context not available. | |||||
| */ | */ | ||||
| static bool wm_operator_register_check(wmWindowManager *wm, wmOperatorType *ot) | static bool wm_operator_register_check(wmWindowManager *wm, wmOperatorType *ot) | ||||
| { | { | ||||
| /* Only register last redo panel barriors if one isn't at the head of the stck. */ | |||||
| if (wm->operators.last && ot->flag & OPTYPE_REDO_PANEL_BARRIER && !(ot->flag & OPTYPE_REGISTER)) { | |||||
| wmOperator *op = static_cast<wmOperator*>(wm->operators.last); | |||||
| return !(op->type->flag & OPTYPE_REDO_PANEL_BARRIER); | |||||
| } | |||||
| /* Check undo flag here since undo operators are also added to the list, | /* Check undo flag here since undo operators are also added to the list, | ||||
| * to support checking if the same operator is run twice. */ | * to support checking if the same operator is run twice. */ | ||||
| return wm && (wm->op_undo_depth == 0) && (ot->flag & (OPTYPE_REGISTER | OPTYPE_UNDO)); | return wm && (wm->op_undo_depth == 0) && (ot->flag & (OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_REDO_PANEL_BARRIER)); | ||||
| } | } | ||||
| static void wm_operator_finished(bContext *C, wmOperator *op, const bool repeat, const bool store) | static void wm_operator_finished(bContext *C, wmOperator *op, const bool repeat, const bool store) | ||||
| Context not available. | |||||
| wm_operator_register(C, op); | wm_operator_register(C, op); | ||||
| WM_operator_region_active_win_set(C); | WM_operator_region_active_win_set(C); | ||||
| if (WM_operator_last_redo(C) == op) { | if (WM_operator_last_redo(C) == op || op->type->flag & OPTYPE_REDO_PANEL_BARRIER) { | ||||
| /* Show the redo panel. */ | /* Show the redo panel. */ | ||||
| hud_status = SET; | hud_status = SET; | ||||
| } | } | ||||
| Context not available. | |||||