Skip to content
Permalink
Browse files

Check field subType for a fallback icon

  • Loading branch information
elpaso authored and nyalldawson committed Sep 24, 2020
1 parent f3ae29d commit 69d66a121dba0fd70e19dc12219297fa2a9e6bc6
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/core/qgsdataitem.cpp
@@ -227,7 +227,13 @@ QgsFieldItem::~QgsFieldItem()

QIcon QgsFieldItem::icon()
{
return QgsFields::iconForFieldType( mField.type() );
const QIcon icon { QgsFields::iconForFieldType( mField.type() ) };
// Try subtype if icon is null
if ( icon.isNull() )
{
return QgsFields::iconForFieldType( mField.subType() );
}
return icon;
}

QIcon QgsFavoritesItem::iconFavorites()

0 comments on commit 69d66a1

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