From 68f6e83eb0a6ad6bce8a792cde4a4fcbd7e4ad61 Mon Sep 17 00:00:00 2001 From: Nils Wallménius Date: Mon, 13 Oct 2008 12:16:06 +0000 Subject: Alternate fix for the bug fixed by FS#9163, the selection in the playlist viewer was one line too low, which caused it to be off-screen if the last item was selected. The cause was that the selected item was set before the list title, fixed by re-calculating the position of the selected item after setting the title. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18797 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/list.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/gui/list.c b/apps/gui/list.c index 295b5fa78d..00d84cb446 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -101,6 +101,7 @@ static struct viewport parent[NB_SCREENS] = void list_init_viewports(struct gui_synclist *list) { (void)list; + force_list_reinit = false; } #endif @@ -231,7 +232,7 @@ void gui_synclist_draw(struct gui_synclist *gui_list) gui_list->nb_items != last_count) { list_init_viewports(gui_list); - force_list_reinit = false; + gui_synclist_select_item(gui_list, gui_list->selected_item); } #ifdef HAVE_BUTTONBAR last_buttonbar = screens[SCREEN_MAIN].has_buttonbar; -- cgit v1.2.3