diff options
author | Kaj Grönholm <kaj.gronholm@qt.io> | 2018-02-26 16:34:42 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2018-03-02 12:53:32 +0000 |
commit | 4fac25bd7db955e9bfef9b8de8278fc84afc5327 (patch) | |
tree | d3023703503df0bc32bb2c70cf6cbfa3b2f2a788 /src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp | |
parent | b22771e6953c7f0d25decaae4dabeff9a520ecd9 (diff) |
Use correct icons in mesh selector1.1
Allows setting custom icon for choosers.
Task-number: QT3DS-195
Change-Id: Iec1d7fd3cf6ebcfaabba222609ec90d86069c9ab
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp')
-rw-r--r-- | src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp b/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp index c0a21750..92e5a516 100644 --- a/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp +++ b/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp @@ -83,7 +83,10 @@ QVariant ChooserModelBase::data(const QModelIndex &index, int role) const switch (role) { case Qt::DecorationRole: - return resourceImageUrl() + CStudioObjectTypes::GetNormalIconName(item.iconType); + if (!item.iconSource.isEmpty()) + return resourceImageUrl() + item.iconSource; + else + return resourceImageUrl() + CStudioObjectTypes::GetNormalIconName(item.iconType); case IsExpandableRole: return false; |