summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-02-24 15:34:42 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-02-27 16:26:41 +0900
commit3574eb8c07b3ea04ba25d7ae9f6bf1df05c5b7d6 (patch)
tree29d1947e8e825cb98e6a1f7b3245e7a3380e58f1 /src/lib/elementary
parent380759a89e88f3f3cc0d4038f3dc5bd5c623160f (diff)
genlist: Fix fileselector crazy behaviour
When using the fileselector in tree view mode (ie. expandable), expanding any folder with a lot of files in it would cause the genlist view to jump somewhere to the bottom. This is because the mechanism preventing the view from moving was assuming that all "prepend" operations meant prepending before the selected item. This is not the case in case of expansion like in the fileselector. @fix
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/elm_genlist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index 44252bac64..bd1219c3e0 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -4663,7 +4663,7 @@ _item_process_post(Elm_Genlist_Data *sd, Elm_Gen_Item *it)
4663 * item this prevents the selected item being scrolled off the 4663 * item this prevents the selected item being scrolled off the
4664 * viewport 4664 * viewport
4665 */ 4665 */
4666 if (sd->selected && it->item->before) 4666 if (sd->selected && it->item->before && !it->hide)
4667 { 4667 {
4668 int y = 0, h; 4668 int y = 0, h;
4669 Elm_Object_Item *eo_it2; 4669 Elm_Object_Item *eo_it2;
@@ -4671,6 +4671,7 @@ _item_process_post(Elm_Genlist_Data *sd, Elm_Gen_Item *it)
4671 eo_it2 = sd->selected->data; 4671 eo_it2 = sd->selected->data;
4672 ELM_GENLIST_ITEM_DATA_GET(eo_it2, it2); 4672 ELM_GENLIST_ITEM_DATA_GET(eo_it2, it2);
4673 if (!it2->item->block) return; 4673 if (!it2->item->block) return;
4674 if (it2->item->order_num_in < it->item->order_num_in) return;
4674 elm_interface_scrollable_content_pos_get(sd->obj, NULL, &y); 4675 elm_interface_scrollable_content_pos_get(sd->obj, NULL, &y);
4675 evas_object_geometry_get(sd->pan_obj, NULL, NULL, NULL, &h); 4676 evas_object_geometry_get(sd->pan_obj, NULL, NULL, NULL, &h);
4676 if ((it->y + it->item->block->y > y + h) || 4677 if ((it->y + it->item->block->y > y + h) ||