diff options
Diffstat (limited to 'src')
3 files changed, 12 insertions, 3 deletions
diff --git a/src/Authoring/Studio/Application/StudioApp.cpp b/src/Authoring/Studio/Application/StudioApp.cpp index 888865f4..f0965d50 100644 --- a/src/Authoring/Studio/Application/StudioApp.cpp +++ b/src/Authoring/Studio/Application/StudioApp.cpp @@ -1421,7 +1421,7 @@ CInspectableBase *CStudioApp::getInspectableFromInstance(qt3dsdm::Qt3DSDMInstanc CInspectableBase *inspectableBase = nullptr; CDoc *doc = m_core->GetDoc(); - if (m_core->GetDoc()->GetDocumentReader().IsInstance(inInstance)) { + if (doc->GetDocumentReader().IsInstance(inInstance)) { CClientDataModelBridge *theBridge = doc->GetStudioSystem()->GetClientDataModelBridge(); qt3dsdm::Qt3DSDMSlideHandle activeSlide = doc->GetActiveSlide(); @@ -1432,7 +1432,7 @@ CInspectableBase *CStudioApp::getInspectableFromInstance(qt3dsdm::Qt3DSDMInstanc inspectableBase = new Qt3DSDMInspectable(inInstance, activeSlideInstance); } - if (inspectableBase) { + if (!inspectableBase) { if (theBridge->IsMaterialBaseInstance(inInstance)) inspectableBase = new Qt3DSDMMaterialInspectable(inInstance); else diff --git a/src/Authoring/Studio/Palettes/Inspector/Qt3DSDMInspectable.cpp b/src/Authoring/Studio/Palettes/Inspector/Qt3DSDMInspectable.cpp index 866ed29e..a82df79c 100644 --- a/src/Authoring/Studio/Palettes/Inspector/Qt3DSDMInspectable.cpp +++ b/src/Authoring/Studio/Palettes/Inspector/Qt3DSDMInspectable.cpp @@ -188,6 +188,15 @@ EStudioObjectType Qt3DSDMInspectable::getObjectType() const return getDoc()->GetStudioSystem()->GetClientDataModelBridge()->GetObjectType(m_instance); } +bool Qt3DSDMInspectable::isValid() const +{ + if (m_activeSlideInstance) { + return getDoc()->GetStudioSystem()->IsInstance(m_instance) + && getDoc()->GetStudioSystem()->IsInstance(m_activeSlideInstance); + } + return getDoc()->GetStudioSystem()->IsInstance(m_instance); +} + bool Qt3DSDMInspectable::isMaster() const { ISlideSystem *slideSystem = getDoc()->GetStudioSystem()->GetSlideSystem(); diff --git a/src/Authoring/Studio/Palettes/Inspector/Qt3DSDMInspectable.h b/src/Authoring/Studio/Palettes/Inspector/Qt3DSDMInspectable.h index 69aae6f5..0da2916d 100644 --- a/src/Authoring/Studio/Palettes/Inspector/Qt3DSDMInspectable.h +++ b/src/Authoring/Studio/Palettes/Inspector/Qt3DSDMInspectable.h @@ -46,7 +46,7 @@ public: long getGroupCount() const override; CInspectorGroup *getGroup(long) override; EStudioObjectType getObjectType() const override; - bool isValid() const override { return true; } // asserted in the constructor + bool isValid() const override; bool isMaster() const override; qt3dsdm::Qt3DSDMInstanceHandle getInstance() const override { return m_instance; } virtual qt3dsdm::TMetaDataPropertyHandleList GetGroupProperties(long inGroupIndex); |