Skip to content

Commit

Permalink
[bugfix] Disable overwriting GPKG layers with rasters in the Browser …
Browse files Browse the repository at this point in the history
…panel until it works properly.
  • Loading branch information
borysiasty committed Oct 25, 2018
1 parent b0104a2 commit 39f97ec
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 39f97ec

Please sign in to comment.