summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2018-09-28 13:14:10 +0300
committerMahmoud Badri <mahmoud.badri@qt.io>2018-09-28 10:39:50 +0000
commit42ccadb854a2653f637bfd17e7cd7edf4ca8f99e (patch)
treeea4f6840b096f70e911308a3f8fbcb659697824d /src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
parent4a65c28e4ad22a246e6e3025161d0f20b7057f44 (diff)
Show ref material parent in the inspector
- When setting a ref material, show the parent of the referenced material between brackets in the combobox. - Fix ref material popup not closing when selecting an item. Task-number: QT3DS-2312 Change-Id: I206fae2de1b5a37bf3b15a6f43ce137aeb279d13 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp')
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
index b28af190..7e93f2d9 100644
--- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
@@ -251,10 +251,8 @@ QString InspectorControlView::titleText() const
bool InspectorControlView::isRefMaterial(int instance) const
{
- CDoc *doc = g_StudioApp.GetCore()->GetDoc();
-
- return doc->GetStudioSystem()->GetClientDataModelBridge()->GetObjectType(instance)
- == OBJTYPE_REFERENCEDMATERIAL;
+ auto bridge = g_StudioApp.GetCore()->GetDoc()->GetStudioSystem()->GetClientDataModelBridge();
+ return bridge->IsReferencedMaterialInstance(instance);
}
bool InspectorControlView::canLinkProperty(int instance, int handle) const
@@ -589,6 +587,7 @@ QObject *InspectorControlView::showMaterialReference(int handle, int instance, c
Q3DStudio::SCOPED_DOCUMENT_EDITOR(*doc, QObject::tr("Set Property"))
->SetInstancePropertyValue(instance, handle, objRef);
}
+ m_matRefListWidget->hide();
});
return m_matRefListWidget;