Skip to content

Commit 39f97ec

Browse files
committedOct 25, 2018
[bugfix] Disable overwriting GPKG layers with rasters in the Browser panel until it works properly.
1 parent b0104a2 commit 39f97ec

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎src/providers/ogr/qgsgeopackagedataitems.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,14 @@ bool QgsGeoPackageCollectionItem::handleDrop( const QMimeData *data, Qt::DropAct
333333
exists = true;
334334
}
335335
}
336-
if ( ! exists || QMessageBox::question( nullptr, tr( "Overwrite Layer" ),
337-
tr( "Destination layer <b>%1</b> already exists. Do you want to overwrite it?" ).arg( dropUri.name ), QMessageBox::Yes | QMessageBox::No ) == QMessageBox::Yes )
336+
337+
if ( exists && !isVector )
338+
{
339+
QMessageBox::warning( nullptr, tr( "Cannot Overwrite Layer" ),
340+
tr( "Destination layer <b>%1</b> already exists. Overwriting with raster layers is not currently supported." ).arg( dropUri.name ) );
341+
}
342+
else if ( ! exists || QMessageBox::question( nullptr, tr( "Overwrite Layer" ),
343+
tr( "Destination layer <b>%1</b> already exists. Do you want to overwrite it?" ).arg( dropUri.name ), QMessageBox::Yes | QMessageBox::No ) == QMessageBox::Yes )
338344
{
339345
if ( isVector ) // Import vectors and aspatial
340346
{

0 commit comments

Comments
 (0)
Please sign in to comment.