slider: fix jumping handler bug.

Summary:
Actual slider value is not changed.
So when user release mouse or touch, slider value is returned
to the value by user set.

This is a partial revert of f41e276160

Fixes T5745

Test Plan: elementary_test -> slider

Reviewers: jpeg

Subscribers: cedric

Maniphest Tasks: T5745

Differential Revision: https://phab.enlightenment.org/D5031
This commit is contained in:
Hosang Kim 2017-07-20 15:21:34 +09:00 committed by Jean-Philippe Andre
parent 7243b71a19
commit 05e3e450e5
2 changed files with 6 additions and 4 deletions

View File

@ -79,6 +79,11 @@ _change_cb2(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
elm_slider_value_set(obj, 80.0);
_popup_add(api);
}
else if (api->popup)
{
evas_object_del(api->popup);
api->popup = NULL;
}
}
void

View File

@ -1075,6 +1075,7 @@ _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y)
Evas_Coord ex = 0, ey = 0;
/* check whether this part is dragable at all */
if (!ep->drag) return;
if (ep->drag->down.count > 0) return;
/* instead of checking for equality, we really should check that
* the difference is greater than foo, but I have no idea what
@ -1085,8 +1086,6 @@ _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y)
if (NEQ(ep->drag->x, x) || ep->drag->tmp.x)
{
if (ep->drag->down.count > 0)
ep->drag->down.x = ex;
ep->drag->x = x;
ep->drag->tmp.x = 0;
ep->drag->need_reset = 0;
@ -1096,8 +1095,6 @@ _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, FLOAT_T x, FLOAT_T y)
if (NEQ(ep->drag->y, y) || ep->drag->tmp.y)
{
if (ep->drag->down.count > 0)
ep->drag->down.y = ey;
ep->drag->y = y;
ep->drag->tmp.y = 0;
ep->drag->need_reset = 0;