diff --git a/src/async/ChangeLog b/src/async/ChangeLog index 66cb590b..5098d5d4 100644 --- a/src/async/ChangeLog +++ b/src/async/ChangeLog @@ -29,6 +29,7 @@ * Added an AudioContainer framework. +* The Config::valueUpdated signal is now only emitted if the value is changed. 1.6.0 -- 01 Sep 2019 diff --git a/src/async/core/AsyncConfig.cpp b/src/async/core/AsyncConfig.cpp index e6cad977..42b7c359 100644 --- a/src/async/core/AsyncConfig.cpp +++ b/src/async/core/AsyncConfig.cpp @@ -224,8 +224,11 @@ void Config::setValue(const std::string& section, const std::string& tag, const std::string& value) { Values &values = sections[section]; - values[tag] = value; - valueUpdated(section, tag); + if (value != values[tag]) + { + values[tag] = value; + valueUpdated(section, tag); + } } /* Config::setValue */ diff --git a/src/async/core/AsyncConfig.h b/src/async/core/AsyncConfig.h index 523ffb11..59ad9808 100644 --- a/src/async/core/AsyncConfig.h +++ b/src/async/core/AsyncConfig.h @@ -427,7 +427,8 @@ class Config * @param tag The tag (variable name) of the update * * This signal is emitted whenever a configuration variable is changed - * by calling the setValue function. + * by calling the setValue function. It will only be emitted if the value + * actually changes. */ sigc::signal valueUpdated; diff --git a/src/versions b/src/versions index 4190527f..413db386 100644 --- a/src/versions +++ b/src/versions @@ -8,7 +8,7 @@ QTEL=1.2.4 LIBECHOLIB=1.3.3 # Version for the Async library -LIBASYNC=1.6.0.99.10 +LIBASYNC=1.6.0.99.11 # SvxLink versions SVXLINK=1.7.99.25