mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-09-03 21:49:13 +00:00
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)
|
||||
{
|
||||
// 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);
|
||||
|
Loading…
Reference in New Issue
Block a user