Skip to content
Permalink
Browse files

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!

(cherry picked from commit 0e76099)
  • Loading branch information
nyalldawson committed Nov 26, 2018
1 parent ec5a3b4 commit bb8854f6388df26b72e217b9598254cbffe16a69
Showing with 1 addition and 3 deletions.
  1. +1 −3 src/app/qgisapp.cpp
@@ -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" )

0 comments on commit bb8854f

Please sign in to comment.
You can’t perform that action at this time.