set sketch modified when using the edit menu to cut/paste

This commit is contained in:
benfry
2004-07-17 02:04:39 +00:00
parent 45ac7279de
commit e121d0a4c7
3 changed files with 10 additions and 17 deletions
+2 -7
View File
@@ -702,6 +702,7 @@ implements MRJAboutHandler, MRJQuitHandler, MRJPrefsHandler
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
textarea.cut();
sketch.setModified();
}
});
menu.add(item);
@@ -718,6 +719,7 @@ implements MRJAboutHandler, MRJQuitHandler, MRJPrefsHandler
item.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
textarea.paste();
sketch.setModified();
}
});
menu.add(item);
@@ -1096,15 +1098,8 @@ implements MRJAboutHandler, MRJQuitHandler, MRJPrefsHandler
* checkModified2() which will get on with business.
*/
protected void checkModified(int checkModifiedMode) {
//checkModified(checkModifiedMode, null, null);
//}
//protected void checkModified(int checkModifiedMode, String path, String name) {
this.checkModifiedMode = checkModifiedMode;
//openingPath = path;
//openingName = name;
//if (!sketch.isModified()) {
//if (sketch.modified) checkModified2();
if (!sketch.modified) {
checkModified2();
return;
+1
View File
@@ -267,6 +267,7 @@ public class PdeSketch {
/**
* This is called upon return from entering a new file name.
* (that is, from either newCode or renameCode after the prompt)
* This code is almost identical for both the newCode and renameCode
* cases, so they're kept merged except for right in the middle
* where they diverge.