Skip to content

Commit

Permalink
[browser] Use link folder icon for symlinked folders
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 4, 2018
1 parent 7ae3864 commit af0ddb6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/qgsdataitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,13 @@ QIcon QgsDirectoryItem::icon()
if ( state() == Populating )
return QgsDataItem::icon();

// symbolic link? use link icon
QFileInfo fi( mDirPath );
if ( fi.isDir() && fi.isSymLink() )
{
return QgsApplication::getThemeIcon( QStringLiteral( "mIconFolderLink.svg" ) );
}

// loaded? show the open dir icon
if ( state() == Populated )
return openDirIcon();
Expand Down

0 comments on commit af0ddb6

Please sign in to comment.