Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
put original message into else
  • Loading branch information
signedav committed Jan 8, 2019
1 parent dba3b28 commit a16e5f2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/providers/ogr/qgsgeopackagedataitems.cpp
Expand Up @@ -525,11 +525,10 @@ bool QgsGeoPackageAbstractLayerItem::deleteLayer()
}
else
{
QMessageBox::information( nullptr, tr( "Delete Layer" ), tr( "Layer <b>%1</b> deleted successfully." ).arg( mName ) );
if ( mParent )
{
QgsGeoPackageConnectionItem *connectionParentItem = qobject_cast<QgsGeoPackageConnectionItem *>( mParent );
if( connectionParentItem )
if ( connectionParentItem )
{
if ( QMessageBox::question( nullptr, QObject::tr( "Delete Layer" ), QObject::tr( "The layer <b>%1</b> deleted successfully."
" Compact database (VACUUM) <b>%2</b> now?" ).arg( mName, connectionParentItem->name() ), QMessageBox::Yes | QMessageBox::No, QMessageBox::No ) == QMessageBox::Yes )
Expand All @@ -539,6 +538,10 @@ bool QgsGeoPackageAbstractLayerItem::deleteLayer()
}
mParent->refreshConnections();
}
else
{
QMessageBox::information( nullptr, tr( "Delete Layer" ), tr( "Layer <b>%1</b> deleted successfully." ).arg( mName ) );
}
}
return true;
}
Expand Down

0 comments on commit a16e5f2

Please sign in to comment.