mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-19 09:54:49 -04:00
closes #312
This commit is contained in:
parent
0279e2bb9b
commit
989b47aba5
@ -460,11 +460,15 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
|
||||
* undo last action
|
||||
*/
|
||||
private void undo() {
|
||||
if (!isLocked() && undoManager.undoAvailable()) {
|
||||
try {
|
||||
undoManager.undo();
|
||||
} catch (ModifyException e) {
|
||||
throw new RuntimeException("internal error in undo", e);
|
||||
if (activeMouseController != mouseNormal)
|
||||
activeMouseController.escapePressed();
|
||||
else {
|
||||
if (!isLocked() && undoManager.undoAvailable()) {
|
||||
try {
|
||||
undoManager.undo();
|
||||
} catch (ModifyException e) {
|
||||
throw new RuntimeException("internal error in undo", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -481,6 +485,7 @@ public class CircuitComponent extends JComponent implements ChangedListener, Lib
|
||||
*/
|
||||
private void redo() {
|
||||
if (!isLocked() && undoManager.redoAvailable()) {
|
||||
activeMouseController.escapePressed();
|
||||
try {
|
||||
undoManager.redo();
|
||||
} catch (ModifyException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user