mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 07:17:43 +02:00
Make entity properties return undefined value after entity is deleted
This commit is contained in:
parent
b55856da08
commit
956e70e415
1 changed files with 5 additions and 0 deletions
|
@ -321,6 +321,11 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
|
||||||
QScriptValue properties = engine->newObject();
|
QScriptValue properties = engine->newObject();
|
||||||
EntityItemProperties defaultEntityProperties;
|
EntityItemProperties defaultEntityProperties;
|
||||||
|
|
||||||
|
if (_created == UNKNOWN_CREATED_TIME) {
|
||||||
|
// No entity properties can have been set so return without setting any default, zero property values.
|
||||||
|
return properties;
|
||||||
|
}
|
||||||
|
|
||||||
if (_idSet) {
|
if (_idSet) {
|
||||||
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER_ALWAYS(id, _id.toString());
|
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER_ALWAYS(id, _id.toString());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue