Skip to content
Permalink
Browse files

Merge pull request #8329 from borysiasty/browser_gpkg_overwrite

Disable overwriting GPKG layers with rasters in the Browser Panel
  • Loading branch information
borysiasty committed Oct 25, 2018
2 parents 6a61d5d + 39f97ec commit 26330069852a6d53fd51f27252ca40b855d8bec4
Showing with 8 additions and 2 deletions.
  1. +8 −2 src/providers/ogr/qgsgeopackagedataitems.cpp
@@ -333,8 +333,14 @@ bool QgsGeoPackageCollectionItem::handleDrop( const QMimeData *data, Qt::DropAct
exists = true;
}
}
if ( ! exists || QMessageBox::question( nullptr, tr( "Overwrite Layer" ),
tr( "Destination layer <b>%1</b> already exists. Do you want to overwrite it?" ).arg( dropUri.name ), QMessageBox::Yes | QMessageBox::No ) == QMessageBox::Yes )

if ( exists && !isVector )
{
QMessageBox::warning( nullptr, tr( "Cannot Overwrite Layer" ),
tr( "Destination layer <b>%1</b> already exists. Overwriting with raster layers is not currently supported." ).arg( dropUri.name ) );
}
else if ( ! exists || QMessageBox::question( nullptr, tr( "Overwrite Layer" ),
tr( "Destination layer <b>%1</b> already exists. Do you want to overwrite it?" ).arg( dropUri.name ), QMessageBox::Yes | QMessageBox::No ) == QMessageBox::Yes )
{
if ( isVector ) // Import vectors and aspatial
{

0 comments on commit 2633006

Please sign in to comment.
You can’t perform that action at this time.