macros can be confusing if you don't understand how they work.

fix super longstanding efm bug where shift+select selected way more items than it should have


SVN revision: 72481
This commit is contained in:
Mike Blumenkrantz 2012-06-19 14:12:41 +00:00
parent 6ba92ab323
commit 20a94946f4
1 changed files with 3 additions and 3 deletions

View File

@ -6309,7 +6309,7 @@ _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, void *evas_event)
if (range_sel) if (range_sel)
{ {
const Eina_List *l; const Eina_List *l, *l2;
E_Fm2_Icon *ic2; E_Fm2_Icon *ic2;
Eina_Bool seen = 0; Eina_Bool seen = 0;
/* find last selected - if any, and select all icons between */ /* find last selected - if any, and select all icons between */
@ -6321,7 +6321,7 @@ _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, void *evas_event)
ic2->last_selected = 0; ic2->last_selected = 0;
if (seen) if (seen)
{ {
EINA_LIST_REVERSE_FOREACH(l, l, ic2) for (l2 = l, ic2 = l2->data; l2; l2 = l2->prev, ic2 = l2->data)
{ {
if (ic == ic2) break; if (ic == ic2) break;
if (!ic2->selected) sel_change = 1; if (!ic2->selected) sel_change = 1;
@ -6331,7 +6331,7 @@ _e_fm2_mouse_1_handler(E_Fm2_Icon *ic, int up, void *evas_event)
} }
else else
{ {
EINA_LIST_FOREACH(l, l, ic2) EINA_LIST_FOREACH(l, l2, ic2)
{ {
if (ic == ic2) break; if (ic == ic2) break;
if (!ic2->selected) sel_change = 1; if (!ic2->selected) sel_change = 1;