Don't drop selection when dragging from selected item

SVN revision: 50841
This commit is contained in:
Iván Briano 2010-08-05 18:17:05 +00:00
parent 03ddd89f5a
commit 530a645192
3 changed files with 8 additions and 8 deletions

View File

@ -239,7 +239,8 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
if (!item->wd->on_hold) if (!item->wd->on_hold)
{ {
item->wd->on_hold = EINA_TRUE; item->wd->on_hold = EINA_TRUE;
_item_unselect(item); if (!item->wd->wasselected)
_item_unselect(item);
} }
} }
if ((item->dragging) && (item->down)) if ((item->dragging) && (item->down))
@ -282,9 +283,8 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
ecore_timer_del(item->long_timer); ecore_timer_del(item->long_timer);
item->long_timer = NULL; item->long_timer = NULL;
} }
if (item->wd->wasselected) if (!item->wd->wasselected)
_item_unselect(item); _item_unselect(item);
item->wd->wasselected = 0;
if (dy < 0) if (dy < 0)
{ {
if (ady > adx) if (ady > adx)

View File

@ -590,7 +590,8 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
if (!it->wd->on_hold) if (!it->wd->on_hold)
{ {
it->wd->on_hold = EINA_TRUE; it->wd->on_hold = EINA_TRUE;
_item_unselect(it); if (!it->wd->wasselected)
_item_unselect(it);
} }
} }
if ((it->dragging) && (it->down)) if ((it->dragging) && (it->down))
@ -635,7 +636,6 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
} }
if (!it->wd->wasselected) if (!it->wd->wasselected)
_item_unselect(it); _item_unselect(it);
it->wd->wasselected = 0;
if (dy < 0) if (dy < 0)
{ {
if (ady > adx) if (ady > adx)
@ -688,7 +688,6 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
Evas_Coord x, y; Evas_Coord x, y;
if (ev->button != 1) return; if (ev->button != 1) return;
Widget_Data *wd = elm_widget_data_get(it->wd->obj);
it->down = 1; it->down = 1;
it->dragging = 0; it->dragging = 0;
@ -704,7 +703,7 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
evas_object_smart_callback_call(it->wd->obj, "clicked", it); evas_object_smart_callback_call(it->wd->obj, "clicked", it);
if (it->long_timer) ecore_timer_del(it->long_timer); if (it->long_timer) ecore_timer_del(it->long_timer);
if (it->realized) if (it->realized)
it->long_timer = ecore_timer_add(wd->longpress_timeout, _long_press, it); it->long_timer = ecore_timer_add(it->wd->longpress_timeout, _long_press, it);
else else
it->long_timer = NULL; it->long_timer = NULL;
} }

View File

@ -368,7 +368,8 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void
ecore_timer_del(it->long_timer); ecore_timer_del(it->long_timer);
it->long_timer = NULL; it->long_timer = NULL;
} }
_item_unselect(it); if (!wd->wasselected)
_item_unselect(it);
} }
} }
} }