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.

(cherry-picked from 85a7d5c)
  • Loading branch information
nyalldawson committed Aug 3, 2018
1 parent 8ce6d28 commit f6692cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -10887,6 +10887,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 f6692cb

Please sign in to comment.