From bb01c91469e3c5cbb250ce47c2d40f00f8be0c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 2 May 2015 12:11:33 +0200 Subject: NOISSUE do not propagate instance change events when nothing actually changed --- logic/BaseInstance.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'logic') 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); -- cgit v1.2.3