Skip to content

Commit

Permalink
Merge pull request #8329 from borysiasty/browser_gpkg_overwrite
Browse files Browse the repository at this point in the history
Disable overwriting GPKG layers with rasters in the Browser Panel
  • Loading branch information
borysiasty committed Oct 25, 2018
2 parents 6a61d5d + 39f97ec commit 2633006
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/providers/ogr/qgsgeopackagedataitems.cpp
Expand Up @@ -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
{
Expand Down

0 comments on commit 2633006

Please sign in to comment.