Skip to content
Permalink
Browse files

request VACUUM after deleting geopackage

  • Loading branch information
signedav committed Jan 8, 2019
1 parent eaad71e commit dba3b28296b0bf469837dd9c03696d177619ab0a
Showing with 11 additions and 0 deletions.
  1. +11 −0 src/providers/ogr/qgsgeopackagedataitems.cpp
@@ -527,7 +527,18 @@ bool QgsGeoPackageAbstractLayerItem::deleteLayer()
{
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 ( 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 )
{
connectionParentItem->vacuumGeoPackageDbAction();
}
}
mParent->refreshConnections();
}
}
return true;
}

0 comments on commit dba3b28

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