Skip to content

Commit

Permalink
Add "refresh" action to geopackage items in browser
Browse files Browse the repository at this point in the history
Fixes #35879
  • Loading branch information
nyalldawson committed Jul 15, 2021
1 parent 8f7ac82 commit 5ae38ec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/providers/ogr/qgsgeopackageitemguiprovider.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 5ae38ec

Please sign in to comment.