Skip to content
Permalink
Browse files
Add "refresh" action to geopackage items in browser
Fixes #35879
  • Loading branch information
nyalldawson committed Jul 15, 2021
1 parent 8f7ac82 commit 5ae38eceaaa190980e1965db0da9f67d562e6383
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gui/providers/ogr/qgsgeopackageitemguiprovider.cpp
@@ -81,6 +81,11 @@ void QgsGeoPackageItemGuiProvider::populateContextMenu( QgsDataItem *item, QMenu

if ( QgsGeoPackageCollectionItem *collectionItem = qobject_cast< QgsGeoPackageCollectionItem * >( item ) )
{
QAction *actionRefresh = new QAction( QObject::tr( "Refresh" ), menu );
connect( actionRefresh, &QAction::triggered, collectionItem, [collectionItem] { collectionItem->refresh(); } );
menu->addAction( actionRefresh );
menu->addSeparator();

if ( QgsOgrDbConnection::connectionList( QStringLiteral( "GPKG" ) ).contains( collectionItem->name() ) )
{
QAction *actionDeleteConnection = new QAction( tr( "Remove Connection" ), menu );

0 comments on commit 5ae38ec

Please sign in to comment.