forked from enlightenment/efl
Fix T966, sort order of child folders.
Comparison was being incorrectly applied for child elements - they need to be treated differently if there are no siblings
This commit is contained in:
parent
9b23d6e02b
commit
72191ab692
|
@ -5758,9 +5758,8 @@ _item_sorted_insert(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
|||
&cmp_result);
|
||||
|
||||
if (l)
|
||||
{
|
||||
rel = eina_list_data_get(l);
|
||||
else
|
||||
rel = it->parent;
|
||||
|
||||
if (cmp_result >= 0)
|
||||
{
|
||||
|
@ -5768,7 +5767,7 @@ _item_sorted_insert(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
|||
(it->parent->item->items, it, l);
|
||||
sd->items = eina_inlist_prepend_relative
|
||||
(sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel));
|
||||
it->item->before = EINA_FALSE;
|
||||
it->item->before = EINA_TRUE;
|
||||
}
|
||||
else if (cmp_result < 0)
|
||||
{
|
||||
|
@ -5776,7 +5775,19 @@ _item_sorted_insert(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
|||
(it->parent->item->items, it, l);
|
||||
sd->items = eina_inlist_append_relative
|
||||
(sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel));
|
||||
it->item->before = EINA_TRUE;
|
||||
it->item->before = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
rel = it->parent;
|
||||
|
||||
// ignoring the comparison
|
||||
it->parent->item->items = eina_list_prepend_relative_list
|
||||
(it->parent->item->items, it, l);
|
||||
sd->items = eina_inlist_prepend_relative
|
||||
(sd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(rel));
|
||||
it->item->before = EINA_FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue