Skip to content

Commit

Permalink
Add hidden setting to skip the project memory layer warning
Browse files Browse the repository at this point in the history
To be used by 3rd party plugins, e.g. memory layer saver, who
may want to surpress this warning.
  • Loading branch information
nyalldawson committed Aug 3, 2018
1 parent 0dc1a61 commit 85a7d5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -10973,6 +10973,9 @@ bool QgisApp::checkUnsavedLayerEdits()

bool QgisApp::checkMemoryLayers()
{
if ( !QgsSettings().value( QStringLiteral( "askToSaveMemoryLayers" ), true, QgsSettings::App ).toBool() )
return true;

// check to see if there are any memory layers present (with features)
bool hasMemoryLayers = false;
const QMap<QString, QgsMapLayer *> layers = QgsProject::instance()->mapLayers();
Expand Down

0 comments on commit 85a7d5c

Please sign in to comment.