Sequence seq;
if(command == "New") {
- Moosique.clearSequence();
+ if (!Moosique.promptOnUnsavedChanges()) Moosique.clearSequence();
} else if (command == "Open...") {
// Shows a file chooser. If shown previously, starts in the current directory.
if (directory != null) {
File file = chooser.getSelectedFile();
if(returnVal == JFileChooser.APPROVE_OPTION && isMidiFile(file)) {
directory = chooser.getSelectedFile().getParentFile();
- Moosique.load(chooser.getSelectedFile().getAbsolutePath());
+ if (!Moosique.promptOnUnsavedChanges())
+ Moosique.load(chooser.getSelectedFile().getAbsolutePath());
}
} else if (command == "Save") {
if (!Moosique.save()) showSaveAsDialog();