From 4fac25bd7db955e9bfef9b8de8278fc84afc5327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaj=20Gr=C3=B6nholm?= Date: Mon, 26 Feb 2018 16:34:42 +0200 Subject: Use correct icons in mesh selector MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows setting custom icon for choosers. Task-number: QT3DS-195 Change-Id: Iec1d7fd3cf6ebcfaabba222609ec90d86069c9ab Reviewed-by: Tomi Korpipää Reviewed-by: Miikka Heikkinen --- src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp') 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; -- cgit v1.2.3