*/
public boolean checkSaveOnClose() {
ProjectController projectController = getProjectController();
if (projectController != null && projectController.isDirty()) {
UnsavedChangesDialog dialog = new UnsavedChangesDialog(Application.getFrame());
dialog.show();
if (dialog.shouldCancel()) {
// discard changes and DO NOT close
Application.getInstance().setQuittingApplication(false);
return false;