From 50530c4f7927fe769f29aa435a0da982ad9c6afd Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 21 Jun 2022 19:15:07 +0200 Subject: [PATCH] Fix undo and redo order. --- modules/paint/paint_window.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/paint/paint_window.cpp b/modules/paint/paint_window.cpp index 72de088b8..143f2ed5d 100644 --- a/modules/paint/paint_window.cpp +++ b/modules/paint/paint_window.cpp @@ -643,8 +643,8 @@ void PaintWindow::redo_action() { return; } - Ref action = _redo_history[0]; - _redo_history.remove(0); + Ref action = _redo_history[_redo_history.size() - 1]; + _redo_history.remove(_redo_history.size() - 1); if (!action.is_valid()) { return; @@ -661,8 +661,8 @@ void PaintWindow::undo_action() { return; } - Ref action = _actions_history[0]; - _actions_history.remove(0); + Ref action = _actions_history[_actions_history.size() - 1]; + _actions_history.remove(_actions_history.size() - 1); if (!action.is_valid()) { return;