Skip to content

Commit 85a7d5c

Browse files
committed
Add hidden setting to skip the project memory layer warning
To be used by 3rd party plugins, e.g. memory layer saver, who may want to surpress this warning.
1 parent 0dc1a61 commit 85a7d5c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/app/qgisapp.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10973,6 +10973,9 @@ bool QgisApp::checkUnsavedLayerEdits()
1097310973

1097410974
bool QgisApp::checkMemoryLayers()
1097510975
{
10976+
if ( !QgsSettings().value( QStringLiteral( "askToSaveMemoryLayers" ), true, QgsSettings::App ).toBool() )
10977+
return true;
10978+
1097610979
// check to see if there are any memory layers present (with features)
1097710980
bool hasMemoryLayers = false;
1097810981
const QMap<QString, QgsMapLayer *> layers = QgsProject::instance()->mapLayers();

0 commit comments

Comments
 (0)