Commit f379d378 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: add sanity check

parent 742c49ae
......@@ -333,12 +333,13 @@ void PropertyEditorNodeWrapper::setup()
delete object;
foreach (const QString &propertyName, m_modelNode.metaInfo().properties().keys()) {
PropertyEditorValue *valueObject = new PropertyEditorValue(&m_valuesPropertyMap);
valueObject->setName(propertyName);
valueObject->setValue(fxObjectNode.instanceValue(propertyName));
connect(valueObject, SIGNAL(valueChanged(QString, const QVariant&)), &m_valuesPropertyMap, SIGNAL(valueChanged(QString, const QVariant&)));
m_valuesPropertyMap.insert(propertyName, QVariant::fromValue(valueObject));
if (fxObjectNode.isValid()) {
PropertyEditorValue *valueObject = new PropertyEditorValue(&m_valuesPropertyMap);
valueObject->setName(propertyName);
valueObject->setValue(fxObjectNode.instanceValue(propertyName));
connect(valueObject, SIGNAL(valueChanged(QString, const QVariant&)), &m_valuesPropertyMap, SIGNAL(valueChanged(QString, const QVariant&)));
m_valuesPropertyMap.insert(propertyName, QVariant::fromValue(valueObject));
}
}
}
connect(&m_valuesPropertyMap, SIGNAL(valueChanged(const QString &, const QVariant&)), this, SLOT(changeValue(const QString&)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment