From 871cc68f499cac262be568357779645ef4321db4 Mon Sep 17 00:00:00 2001 From: Alessandro Pasotti Date: Thu, 4 Jun 2020 12:44:22 +0200 Subject: [PATCH] Browser GPKG: fix drag and drop issue Fix a few more unreported issues with GPKG browser operations. --- src/gui/providers/ogr/qgsgeopackageitemguiprovider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/providers/ogr/qgsgeopackageitemguiprovider.cpp b/src/gui/providers/ogr/qgsgeopackageitemguiprovider.cpp index d9b9872cf98..6be3daaac75 100644 --- a/src/gui/providers/ogr/qgsgeopackageitemguiprovider.cpp +++ b/src/gui/providers/ogr/qgsgeopackageitemguiprovider.cpp @@ -94,7 +94,7 @@ void QgsGeoPackageItemGuiProvider::populateContextMenu( QgsDataItem *item, QMenu // Add table to existing DB QAction *actionAddTable = new QAction( tr( "Create a New Layer or Table…" ), collectionItem->parent() ); QPointercollectionItemPtr { collectionItem }; - const QString itemPath = collectionItem->path(); + const QString itemPath = collectionItem->path().remove( QStringLiteral( "gpkg:/" ) ); connect( actionAddTable, &QAction::triggered, actionAddTable, [ collectionItemPtr, itemPath ] { QgsNewGeoPackageLayerDialog dialog( nullptr ); @@ -463,7 +463,7 @@ bool QgsGeoPackageItemGuiProvider::handleDropGeopackage( QgsGeoPackageCollection if ( srcLayer->isValid() ) { - uri = item->path(); + uri = item->path().remove( QStringLiteral( "gpkg:/" ) ); QgsDebugMsgLevel( "URI " + uri, 3 ); // check if the destination layer already exists