diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp index 1c6d3e4bb..e048f475a 100644 --- a/logic/BaseInstance.cpp +++ b/logic/BaseInstance.cpp @@ -117,6 +117,9 @@ void BaseInstance::setFlags(const InstanceFlags &flags) void BaseInstance::setFlag(const BaseInstance::InstanceFlag flag) { + // nothing to set? + if(flag & m_flags) + return; m_flags |= flag; emit flagsChanged(); emit propertiesChanged(this); @@ -124,6 +127,9 @@ void BaseInstance::setFlag(const BaseInstance::InstanceFlag flag) void BaseInstance::unsetFlag(const BaseInstance::InstanceFlag flag) { + // nothing to unset? + if(!(flag & m_flags)) + return; m_flags &= ~flag; emit flagsChanged(); emit propertiesChanged(this);