Skip to content

Commit

Permalink
Also prompt to save projects with no layers, but changes
Browse files Browse the repository at this point in the history
Because if a user wants a "layout only" project, we should still
give them unsaved changes warnings!

(cherry picked from commit 0e76099)
  • Loading branch information
nyalldawson committed Nov 27, 2018
1 parent ec5a3b4 commit bb8854f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/app/qgisapp.cpp
Expand Up @@ -11146,14 +11146,12 @@ bool QgisApp::saveDirty()
QgsSettings settings;
bool askThem = settings.value( QStringLiteral( "qgis/askToSaveProjectChanges" ), true ).toBool();

if ( askThem && QgsProject::instance()->isDirty() && QgsProject::instance()->count() > 0 )
if ( askThem && QgsProject::instance()->isDirty() )
{
// flag project as dirty since dirty state of canvas is reset if "dirty"
// is based on a zoom or pan
markDirty();

// old code: mProjectIsDirtyFlag = true;

// prompt user to save
answer = QMessageBox::question( this, tr( "Save Project" ),
tr( "Do you want to save the current project? %1" )
Expand Down

0 comments on commit bb8854f

Please sign in to comment.