Skip to content
Permalink
Browse files

[ui] add a favorite star to menu action

  • Loading branch information
nirvn committed Oct 3, 2018
1 parent 3235fb5 commit f4bc24c58f19c3e318ef573a2fe573e598a939e0
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/gui/qgsbrowserdockwidget.cpp
@@ -204,7 +204,10 @@ void QgsBrowserDockWidget::showContextMenu( QPoint pt )
if ( item->parent() && !inFavDirs )
{
// only non-root directories can be added as favorites
menu->addAction( tr( "Add as a Favorite" ), this, SLOT( addFavorite() ) );
QAction *addAsFavorite = new QAction( tr( "Add as a Favorite" ), this );
addAsFavorite->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mIconFavourites.svg" ) ) );
menu->addAction( addAsFavorite );
connect( addAsFavorite, &QAction::triggered, this, &QgsBrowserDockWidget::addFavorite );
}
else if ( inFavDirs )
{

0 comments on commit f4bc24c

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