We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dbe9eec commit 82604c2Copy full SHA for 82604c2
src/app/qgisapp.cpp
@@ -5029,7 +5029,7 @@ bool QgisApp::saveDirty()
5029
QSettings settings;
5030
bool askThem = settings.value( "qgis/askToSaveProjectChanges", true ).toBool();
5031
5032
- if ( askThem && ( QgsProject::instance()->isDirty() || mMapCanvas->isDirty() ) && mMapCanvas->layerCount() > 0 )
+ if ( askThem && ( QgsProject::instance()->isDirty() || mMapCanvas->isDirty() ) && QgsMapLayerRegistry::instance()->count() > 0 )
5033
{
5034
// flag project as dirty since dirty state of canvas is reset if "dirty"
5035
// is based on a zoom or pan
0 commit comments