NOISSUE do not propagate instance change events when nothing actually changed
This commit is contained in:
parent
fb3c9efc8a
commit
bb01c91469
@ -117,6 +117,9 @@ void BaseInstance::setFlags(const InstanceFlags &flags)
|
|||||||
|
|
||||||
void BaseInstance::setFlag(const BaseInstance::InstanceFlag flag)
|
void BaseInstance::setFlag(const BaseInstance::InstanceFlag flag)
|
||||||
{
|
{
|
||||||
|
// nothing to set?
|
||||||
|
if(flag & m_flags)
|
||||||
|
return;
|
||||||
m_flags |= flag;
|
m_flags |= flag;
|
||||||
emit flagsChanged();
|
emit flagsChanged();
|
||||||
emit propertiesChanged(this);
|
emit propertiesChanged(this);
|
||||||
@ -124,6 +127,9 @@ void BaseInstance::setFlag(const BaseInstance::InstanceFlag flag)
|
|||||||
|
|
||||||
void BaseInstance::unsetFlag(const BaseInstance::InstanceFlag flag)
|
void BaseInstance::unsetFlag(const BaseInstance::InstanceFlag flag)
|
||||||
{
|
{
|
||||||
|
// nothing to unset?
|
||||||
|
if(!(flag & m_flags))
|
||||||
|
return;
|
||||||
m_flags &= ~flag;
|
m_flags &= ~flag;
|
||||||
emit flagsChanged();
|
emit flagsChanged();
|
||||||
emit propertiesChanged(this);
|
emit propertiesChanged(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user