Skip to content

Commit bb8854f

Browse files
committed
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)
1 parent ec5a3b4 commit bb8854f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/app/qgisapp.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -11146,14 +11146,12 @@ bool QgisApp::saveDirty()
1114611146
QgsSettings settings;
1114711147
bool askThem = settings.value( QStringLiteral( "qgis/askToSaveProjectChanges" ), true ).toBool();
1114811148

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

11155-
// old code: mProjectIsDirtyFlag = true;
11156-
1115711155
// prompt user to save
1115811156
answer = QMessageBox::question( this, tr( "Save Project" ),
1115911157
tr( "Do you want to save the current project? %1" )

0 commit comments

Comments
 (0)