summaryrefslogtreecommitdiffstats
path: root/src/modeling/qmodelingobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modeling/qmodelingobject.cpp')
-rw-r--r--src/modeling/qmodelingobject.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modeling/qmodelingobject.cpp b/src/modeling/qmodelingobject.cpp
index 15f4f1d6..a4786c14 100644
--- a/src/modeling/qmodelingobject.cpp
+++ b/src/modeling/qmodelingobject.cpp
@@ -163,6 +163,13 @@ bool QModelingObject::isKindOf(QString type) const
return d->propertyGroups.contains(type);
}
+void QModelingObject::setObjectName(const QString &name)
+{
+ QObject::setObjectName(name);
+ if (metaObject()->indexOfProperty("name") != -1)
+ setProperty("name", name);
+}
+
/*!
Creates a new QModelingObject with the given \a parent. This is a protected constructor
since this class is not intended to be directly instantiated.