hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=30c6af45fe76920503dc70f36dae0c3f7a53b1a6

commit 30c6af45fe76920503dc70f36dae0c3f7a53b1a6
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Thu Jul 9 15:19:54 2015 +0900

    slider: compare slider values elaborately.
    
    because of the double type nature,
    the comparison is not correct.
    
    we decide the value changes with range of double epsilon to avoid this.
    
    @fix
---
 src/lib/elm_slider.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_slider.c b/src/lib/elm_slider.c
index 5d8eafc..cc14586 100644
--- a/src/lib/elm_slider.c
+++ b/src/lib/elm_slider.c
@@ -89,7 +89,7 @@ _val_fetch(Evas_Object *obj, Eina_Bool user_event)
      pos = 1.0 - pos;
 
    val = (pos * (sd->val_max - sd->val_min)) + sd->val_min;
-   if (val != sd->val)
+   if (fabs(val - sd->val) > DBL_EPSILON)
      {
         sd->val = val;
         if (user_event)

-- 


Reply via email to