summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2008-10-13 12:16:06 +0000
committerNils Wallménius <nils@rockbox.org>2008-10-13 12:16:06 +0000
commit68f6e83eb0a6ad6bce8a792cde4a4fcbd7e4ad61 (patch)
treece5ffd0da2b6b0cbc27e90efc919d5045623463e
parent7a6aeb8713c23bb3c11fb9f41dc067e446576571 (diff)
downloadrockbox-68f6e83eb0a6ad6bce8a792cde4a4fcbd7e4ad61.tar.gz
rockbox-68f6e83eb0a6ad6bce8a792cde4a4fcbd7e4ad61.zip
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
-rw-r--r--apps/gui/list.c3
1 files changed, 2 insertions, 1 deletions
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] =
101void list_init_viewports(struct gui_synclist *list) 101void list_init_viewports(struct gui_synclist *list)
102{ 102{
103 (void)list; 103 (void)list;
104 force_list_reinit = false;
104} 105}
105#endif 106#endif
106 107
@@ -231,7 +232,7 @@ void gui_synclist_draw(struct gui_synclist *gui_list)
231 gui_list->nb_items != last_count) 232 gui_list->nb_items != last_count)
232 { 233 {
233 list_init_viewports(gui_list); 234 list_init_viewports(gui_list);
234 force_list_reinit = false; 235 gui_synclist_select_item(gui_list, gui_list->selected_item);
235 } 236 }
236#ifdef HAVE_BUTTONBAR 237#ifdef HAVE_BUTTONBAR
237 last_buttonbar = screens[SCREEN_MAIN].has_buttonbar; 238 last_buttonbar = screens[SCREEN_MAIN].has_buttonbar;