From 70b6cffda7f75529e11a70926d86becf69281798 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Thu, 19 Jun 2014 22:35:55 +0200 Subject: [PATCH] only emit state changes if the states actually change for real --- libguh/plugin/device.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libguh/plugin/device.cpp b/libguh/plugin/device.cpp index 38421420..e5eff79e 100644 --- a/libguh/plugin/device.cpp +++ b/libguh/plugin/device.cpp @@ -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;