Skip to content

Commit

Permalink
[ui] add a favorite star to menu action
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Oct 3, 2018
1 parent 3235fb5 commit f4bc24c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/gui/qgsbrowserdockwidget.cpp
Expand Up @@ -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 )
{
Expand Down

0 comments on commit f4bc24c

Please sign in to comment.