Merge pull request #6937 from ctrlaltdavid/20790

Make entity properties be undefined after entity is unloaded
This commit is contained in:
Andrew Meadows 2016-01-28 11:59:01 -08:00
commit 3e35a5fc2d
2 changed files with 5 additions and 1 deletions

View file

@ -1515,7 +1515,6 @@ SelectionDisplay = (function() {
}
that.updateRotationHandles();
that.highlightSelectable();
var rotation, dimensions, position, registrationPoint;

View file

@ -321,6 +321,11 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
QScriptValue properties = engine->newObject();
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) {
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER_ALWAYS(id, _id.toString());
}