Skip to content

Refactored undo redo: no undo/redo while game is running

Niklas Krieger requested to merge bugfix_conceptuallyBrokenUndoRedo into master

Currently, undo and redo is also possible if the game is running. However, when an additional command is executed, redoAll() is executed.
Only the JavaFXUI prevents undo and redo while running.
The problem: if undo is called via the Api, a command is undone, all precondition checks are done via this state, but before the execution, all commands are undone.
This can lead to very strange bugs, so this now the behavior is different: if the game is Running, undo is no longer possible

Edited by Niklas Krieger

Merge request reports

Loading