Skip to content
Permalink
Browse files

address review comments

  • Loading branch information
alexbruy committed Aug 18, 2020
1 parent e4b7076 commit 92dafd60eca71871da070e219b7b91bca3ca5da5
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/app/browser/qgsinbuiltdataitemproviders.cpp
@@ -174,15 +174,14 @@ void QgsAppDirectoryItemGuiProvider::populateContextMenu( QgsDataItem *item, QMe
} );
menu->addAction( hideAction );

QMenu *hiddenMenu = new QMenu( tr( "Hidden items" ), menu );
QMenu *hiddenMenu = new QMenu( tr( "Hidden Items" ), menu );
int count = 0;
const QStringList hiddenPathList = settings.value( QStringLiteral( "/browser/hiddenPaths" ) ).toStringList();
for ( const QString &path : hiddenPathList )
{
QAction *action = new QAction( path, hiddenMenu );
connect( action, &QAction::triggered, this, [ = ]
{
QString path = qobject_cast<QAction *>( sender() )->text();
QgsSettings s;
QStringList pathsList = s.value( QStringLiteral( "/browser/hiddenPaths" ) ).toStringList();
pathsList.removeAll( path );
@@ -192,8 +191,8 @@ void QgsAppDirectoryItemGuiProvider::populateContextMenu( QgsDataItem *item, QMe
int idx = path.lastIndexOf( QStringLiteral( "/" ) );
if ( idx != -1 && path.count( QStringLiteral( "/" ) ) > 1 )
{
path = path.left( idx );
QgisApp::instance()->browserModel()->refresh( path );
QString parentPath = path.left( idx );
QgisApp::instance()->browserModel()->refresh( parentPath );
}
else
{

0 comments on commit 92dafd6

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