|
From: Tapio V. <aa...@us...> - 2011-01-18 11:02:58
|
Module: editor
Branch: master
Commit: a7ec0d5c2dc6884714f15a9258b44e54a814e998
Author: Tapio Vierros <tap...@gm...>
Date: Tue Jan 18 13:01:54 2011 +0200
Consider initial state 'saved' and fix save prompt.
---
editorapp.cc | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/editorapp.cc b/editorapp.cc
index de36fac..e018353 100644
--- a/editorapp.cc
+++ b/editorapp.cc
@@ -37,9 +37,7 @@ EditorApp::EditorApp(QWidget *parent): QMainWindow(parent), projectFileName(), h
moveop << (int)noteGraph->noteLabels().size()-1 << 600 - noteGraph->noteLabels().back()->width() << noteGraph->noteLabels().back()->y();
noteGraph->doOperation(moveop);
noteGraph->doOperation(Operation("BLOCK")); // Lock the undo stack
-
noteGraph->updateNotes();
-
updateNoteInfo(NULL);
song.reset(new Song);
@@ -59,6 +57,9 @@ EditorApp::EditorApp(QWidget *parent): QMainWindow(parent), projectFileName(), h
ui.actionLyricsFromFile->setIcon(QIcon::fromTheme("insert-text"));
ui.actionLyricsFromClipboard->setIcon(QIcon::fromTheme("insert-text"));
ui.actionAbout->setIcon(QIcon::fromTheme("help-about"));
+
+ hasUnsavedChanges = false;
+ updateMenuStates();
}
void EditorApp::operationDone(const Operation &op)
@@ -233,10 +234,11 @@ bool EditorApp::promptSaving()
on_actionSave_triggered();
case QMessageBox::No:
return true;
- default: break;
+ default:
+ return false;
}
}
- return false;
+ return true;
}
void EditorApp::saveProject(QString fileName)
|