Skip to content

Commit

Permalink
Transaction and Geopackage datasets: make it work when the layer whos…
Browse files Browse the repository at this point in the history
…e edition is turned off hasn't been modified (fixes #38697)

We cannot use QgsDataSourceUri::connectionInfo() as it returns an empty string
for OGR datasources. So use QgsTransaction::connectionString() as in other places.

(cherry picked from commit 92ed450)
  • Loading branch information
rouault authored and nyalldawson committed Oct 23, 2020
1 parent f48e181 commit a1fc689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -9779,7 +9779,7 @@ bool QgisApp::toggleEditing( QgsMapLayer *layer, bool allowCancel )

bool res = true;

QString connString = QgsDataSourceUri( vlayer->source() ).connectionInfo();
QString connString = QgsTransaction::connectionString( vlayer->source() );
QString key = vlayer->providerType();

QMap< QPair< QString, QString>, QgsTransactionGroup *> transactionGroups = QgsProject::instance()->transactionGroups();
Expand Down

0 comments on commit a1fc689

Please sign in to comment.