Now ask whether to save the project when the diagrams order is changed.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@1910 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2012-07-13 17:34:34 +00:00
parent 0c85acee54
commit 14096b7f85
2 changed files with 5 additions and 2 deletions

View File

@@ -233,8 +233,10 @@ bool ProjectView::tryClosingElementEditors() {
int ProjectView::tryClosingDiagrams() {
if (!project_) return(QDialogButtonBox::DestructiveRole);
bool project_modified = project_ -> projectOptionsWereModified();
QList<Diagram *> modified_diagrams = getDiagrams(AllDiagrams | ModifiedDiagramsOnly);
if (!modified_diagrams.count() && !project_ -> filePath().isEmpty()) {
bool has_filepath = !project_ -> filePath().isEmpty();
if (!project_modified && !modified_diagrams.count() && has_filepath) {
// nothing was modified, and we have a filepath, i.e. everything was already
// saved, i.e we can close the project right now
return(QDialogButtonBox::DestructiveRole);