mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 12:26:59 +01:00
Fix undo and redo order.
This commit is contained in:
parent
10eeb612b0
commit
50530c4f79
@ -643,8 +643,8 @@ void PaintWindow::redo_action() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<PaintAction> action = _redo_history[0];
|
Ref<PaintAction> action = _redo_history[_redo_history.size() - 1];
|
||||||
_redo_history.remove(0);
|
_redo_history.remove(_redo_history.size() - 1);
|
||||||
|
|
||||||
if (!action.is_valid()) {
|
if (!action.is_valid()) {
|
||||||
return;
|
return;
|
||||||
@ -661,8 +661,8 @@ void PaintWindow::undo_action() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<PaintAction> action = _actions_history[0];
|
Ref<PaintAction> action = _actions_history[_actions_history.size() - 1];
|
||||||
_actions_history.remove(0);
|
_actions_history.remove(_actions_history.size() - 1);
|
||||||
|
|
||||||
if (!action.is_valid()) {
|
if (!action.is_valid()) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user