mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:35:08 +02:00
workaround bug
This commit is contained in:
parent
b189433855
commit
2d0b85af72
2 changed files with 6 additions and 5 deletions
|
@ -27,10 +27,6 @@ MaterialEntityItem::MaterialEntityItem(const EntityItemID& entityItemID) : Entit
|
|||
_type = EntityTypes::Material;
|
||||
}
|
||||
|
||||
MaterialEntityItem::~MaterialEntityItem() {
|
||||
removeMaterial();
|
||||
}
|
||||
|
||||
EntityItemProperties MaterialEntityItem::getProperties(EntityPropertyFlags desiredProperties) const {
|
||||
EntityItemProperties properties = EntityItem::getProperties(desiredProperties); // get the properties from our base class
|
||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(materialURL, getMaterialURL);
|
||||
|
@ -329,6 +325,11 @@ void MaterialEntityItem::postParentFixup() {
|
|||
applyMaterial();
|
||||
}
|
||||
|
||||
void MaterialEntityItem::preDelete() {
|
||||
EntityItem::preDelete();
|
||||
removeMaterial();
|
||||
}
|
||||
|
||||
void MaterialEntityItem::update(const quint64& now) {
|
||||
if (_retryApply) {
|
||||
applyMaterial();
|
||||
|
|
|
@ -21,7 +21,6 @@ public:
|
|||
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
||||
|
||||
MaterialEntityItem(const EntityItemID& entityItemID);
|
||||
~MaterialEntityItem();
|
||||
|
||||
ALLOW_INSTANTIATION // This class can be instantiated
|
||||
|
||||
|
@ -85,6 +84,7 @@ public:
|
|||
void removeMaterial();
|
||||
|
||||
void postParentFixup() override;
|
||||
void preDelete() override;
|
||||
|
||||
private:
|
||||
// URL for this material. Currently, only JSON format is supported. Set to "userData" to use the user data to live edit a material.
|
||||
|
|
Loading…
Reference in a new issue