summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--logic/BaseInstance.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/logic/BaseInstance.cpp b/logic/BaseInstance.cpp
index 1c6d3e4b..e048f475 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);