diff --git a/sources/projectview.cpp b/sources/projectview.cpp index e40192dab..5249ab288 100644 --- a/sources/projectview.cpp +++ b/sources/projectview.cpp @@ -233,8 +233,10 @@ bool ProjectView::tryClosingElementEditors() { int ProjectView::tryClosingDiagrams() { if (!project_) return(QDialogButtonBox::DestructiveRole); + bool project_modified = project_ -> projectOptionsWereModified(); QList 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); diff --git a/sources/qetproject.cpp b/sources/qetproject.cpp index 3eac94bbd..cb50d896f 100644 --- a/sources/qetproject.cpp +++ b/sources/qetproject.cpp @@ -843,6 +843,7 @@ void QETProject::diagramOrderChanged(int old_index, int new_index) { diagrams_.move(old_index, new_index); updateDiagramsFolioData(); + setModified(true); emit(projectDiagramsOrderChanged(this, old_index, new_index)); } @@ -1146,7 +1147,7 @@ NamesList QETProject::namesListForIntegrationCategory() { /** @return true if project options (title, project-wide properties, settings - for new diagrams, ...) were modified, false otherwise. + for new diagrams, diagrams order...) were modified, false otherwise. */ bool QETProject::projectOptionsWereModified() { // unlike similar methods, this method does not compare the content against