Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Also prompt to save projects with no layers, but changes
Because if a user wants a "layout only" project, we should still
give them unsaved changes warnings!
  • Loading branch information
nyalldawson committed Nov 26, 2018
1 parent 64bd9e5 commit 0e76099
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/app/qgisapp.cpp
Expand Up @@ -11262,14 +11262,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 0e76099

Please sign in to comment.