only emit state changes if the states actually change for real
This commit is contained in:
parent
a6725ec4e9
commit
70b6cffda7
@ -160,6 +160,9 @@ void Device::setStateValue(const StateTypeId &stateTypeId, const QVariant &value
|
||||
{
|
||||
for (int i = 0; i < m_states.count(); ++i) {
|
||||
if (m_states.at(i).stateTypeId() == stateTypeId) {
|
||||
if (m_states.at(i).value() == value) {
|
||||
return;
|
||||
}
|
||||
State newState(stateTypeId, m_id);
|
||||
newState.setValue(value);
|
||||
m_states[i] = newState;
|
||||
|
||||
Reference in New Issue
Block a user