Object inspector has been fixed

This commit is contained in:
Arin Alexander
2016-11-01 14:56:06 +03:00
parent b8ecc89ff0
commit c623932afb
9 changed files with 75 additions and 20 deletions

View File

@@ -147,9 +147,11 @@ void ObjectPropItem::slotPropertyObjectName(const QString &oldValue, const QStri
void ObjectPropItem::setValueToObject(const QString &propertyName, QVariant propertyValue)
{
object()->setProperty(propertyName.toLatin1(),propertyValue);
foreach (QObject* item, *objects()) {
if (item->metaObject()->indexOfProperty(propertyName.toLatin1())!=-1)
item->setProperty(propertyName.toLatin1(), propertyValue);
if (objects()){
foreach (QObject* item, *objects()) {
if (item->metaObject()->indexOfProperty(propertyName.toLatin1())!=-1)
item->setProperty(propertyName.toLatin1(), propertyValue);
}
}
}