mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-13 10:29:35 +01:00
Undo and Redo state update were setting the sketch to modified, even if it was not. Fixes #2653
This commit is contained in:
parent
d1feeb5419
commit
78f2e87b00
@ -1365,6 +1365,7 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
undo.undo();
|
||||
sketch.setModified(true);
|
||||
} catch (CannotUndoException ex) {
|
||||
//System.out.println("Unable to undo: " + ex);
|
||||
//ex.printStackTrace();
|
||||
@ -1386,17 +1387,11 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
undoItem.setEnabled(true);
|
||||
undoItem.setText(undo.getUndoPresentationName());
|
||||
putValue(Action.NAME, undo.getUndoPresentationName());
|
||||
if (sketch != null) {
|
||||
sketch.setModified(true); // 0107
|
||||
}
|
||||
} else {
|
||||
this.setEnabled(false);
|
||||
undoItem.setEnabled(false);
|
||||
undoItem.setText(_("Undo"));
|
||||
putValue(Action.NAME, "Undo");
|
||||
if (sketch != null) {
|
||||
sketch.setModified(false); // 0107
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1411,6 +1406,7 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
try {
|
||||
undo.redo();
|
||||
sketch.setModified(true);
|
||||
} catch (CannotRedoException ex) {
|
||||
//System.out.println("Unable to redo: " + ex);
|
||||
//ex.printStackTrace();
|
||||
|
Loading…
x
Reference in New Issue
Block a user