mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:41:20 +02:00
fix to preload getting called when you change a script
This commit is contained in:
parent
80ecbed02b
commit
a765b4c8a5
1 changed files with 6 additions and 0 deletions
|
@ -148,6 +148,7 @@ bool EntityTree::updateEntityWithElement(EntityItem* entity, const EntityItemPro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
QString entityScriptBefore = entity->getScript();
|
||||||
uint32_t preFlags = entity->getDirtyFlags();
|
uint32_t preFlags = entity->getDirtyFlags();
|
||||||
UpdateEntityOperator theOperator(this, containingElement, entity, properties);
|
UpdateEntityOperator theOperator(this, containingElement, entity, properties);
|
||||||
recurseTreeWithOperator(&theOperator);
|
recurseTreeWithOperator(&theOperator);
|
||||||
|
@ -166,6 +167,11 @@ bool EntityTree::updateEntityWithElement(EntityItem* entity, const EntityItemPro
|
||||||
entity->clearDirtyFlags();
|
entity->clearDirtyFlags();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString entityScriptAfter = entity->getScript();
|
||||||
|
if (entityScriptBefore != entityScriptAfter) {
|
||||||
|
emitEntityScriptChanging(entity->getEntityItemID()); // the entity script has changed
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: this final containingElement check should eventually be removed (or wrapped in an #ifdef DEBUG).
|
// TODO: this final containingElement check should eventually be removed (or wrapped in an #ifdef DEBUG).
|
||||||
|
|
Loading…
Reference in a new issue