// Stores the current directory and loads the selected file.
File file = chooser.getSelectedFile();
if(returnVal == JFileChooser.APPROVE_OPTION && isMidiFile(file)) {
- directory = chooser.getSelectedFile().getParentFile();
+ directory = file.getParentFile();
if (!Moosique.promptOnUnsavedChanges())
- Moosique.load(chooser.getSelectedFile().getAbsolutePath());
+ Moosique.load(file);
}
} else if (command == "Save") {
if (!Moosique.save()) showSaveAsDialog();
} else if (command == "Set tempo...") {
MooDialog newDialog = new MooDialog(MooDialog.SET_TEMPO);
-
} else if (command == "Scale velocity...") {
MooDialog newDialog = new MooDialog(MooDialog.SCALE_VELOCITY);
-
} else if (command == "Transpose...") {
MooDialog newDialog = new MooDialog(MooDialog.TRANSPOSE);
-
} else if (command == "User manual") {
MooDialog manual = new MooDialog(MooDialog.MANUAL);
} else if (command == "About") {
File file = chooser.getSelectedFile();
if(returnVal == JFileChooser.APPROVE_OPTION && isMidiFile(file)) {
directory = file.getParentFile();
- Moosique.saveAs(file.getAbsolutePath());
+ Moosique.saveAs(file);
}
}