Skip to content

Commit 68c5e39

Browse files
committed
Allow data item's icon name to directly reference an icon (outside theme)
1 parent 59e710c commit 68c5e39

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/qgsdataitem.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ QIcon QgsDataItem::icon()
254254
return mIcon;
255255

256256
if ( !mIconMap.contains( mIconName ) )
257-
mIconMap.insert( mIconName, QgsApplication::getThemeIcon( mIconName ) );
257+
{
258+
mIconMap.insert( mIconName, mIconName.startsWith( ":" ) ? QIcon( mIconName ) : QgsApplication::getThemeIcon( mIconName ) );
259+
}
258260

259261
return mIconMap.value( mIconName );
260262
}

0 commit comments

Comments
 (0)