diff options
-rw-r--r-- | src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp index 1232939c..e7dbfe7f 100644 --- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp +++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlModel.cpp @@ -1000,10 +1000,8 @@ bool InspectorControlModel::isTreeRebuildRequired(CInspectableBase* inspectBase) long theCount = m_inspectableBase->GetGroupCount(); auto refMaterial = getReferenceMaterial(inspectBase); - if (refMaterial != m_refMaterial) { - m_refMaterial = refMaterial; + if (refMaterial != m_refMaterial) return true; - } long refMaterialGroupCount = 0; if (refMaterial.Valid()) refMaterialGroupCount = 1; // Only the last group of the refMaterial is used @@ -1196,6 +1194,8 @@ void InspectorControlModel::rebuildTree() // Clean the old objects after reset is done so that qml will not freak out about null pointers for (int i = 0; i < deleteVector.count(); ++i) deleteVector[i]->deleteLater(); + + m_refMaterial = getReferenceMaterial(m_inspectableBase); } int InspectorControlModel::rowCount(const QModelIndex &parent) const |