Use qFuzzyCompare() for evComp settings
authorMohammed Sameer <msameer@foolab.org>
Wed, 19 Dec 2012 21:27:53 +0000 (23:27 +0200)
committerMohammed Sameer <msameer@foolab.org>
Wed, 19 Dec 2012 21:27:53 +0000 (23:27 +0200)
src/settings.cpp

index ac114ab..2cf7b03 100644 (file)
@@ -151,7 +151,7 @@ qreal Settings::imageEvComp() const {
 }
 
 void Settings::setImageEvComp(qreal ev) {
-  if (ev != imageEvComp()) {
+  if (!qFuzzyCompare(ev, imageEvComp())) {
     m_settings->setValue("image/evComp", ev);
 
     emit imageEvCompChanged();
@@ -199,7 +199,7 @@ qreal Settings::videoEvComp() const {
 }
 
 void Settings::setVideoEvComp(qreal ev) {
-  if (ev != videoEvComp()) {
+  if (!qFuzzyCompare(ev, videoEvComp())) {
     m_settings->setValue("video/evComp", ev);
 
     emit videoEvCompChanged();