Skip to content

Commit

Permalink
Allow data item's icon name to directly reference an icon (outside th…
Browse files Browse the repository at this point in the history
…eme)
  • Loading branch information
wonder-sk committed Mar 4, 2015
1 parent 59e710c commit 68c5e39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/qgsdataitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ QIcon QgsDataItem::icon()
return mIcon;

if ( !mIconMap.contains( mIconName ) )
mIconMap.insert( mIconName, QgsApplication::getThemeIcon( mIconName ) );
{
mIconMap.insert( mIconName, mIconName.startsWith( ":" ) ? QIcon( mIconName ) : QgsApplication::getThemeIcon( mIconName ) );
}

return mIconMap.value( mIconName );
}
Expand Down

0 comments on commit 68c5e39

Please sign in to comment.