diff --git a/apps/root_menu.c b/apps/root_menu.c index 49c31cb512..050f5be3c6 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -84,7 +84,7 @@ static int browser(void* param) static char last_folder[MAX_PATH] = "/"; /* and stuff for the database browser */ #ifdef HAVE_TAGCACHE - static int last_db_dirlevel = 0; + static int last_db_dirlevel = 0, last_db_selection = 0; #endif switch ((intptr_t)param) @@ -166,6 +166,7 @@ static int browser(void* param) return GO_TO_PREVIOUS; filter = SHOW_ID3DB; tc->dirlevel = last_db_dirlevel; + tc->selected_item = last_db_selection; break; #endif case GO_TO_BROWSEPLUGINS: @@ -182,6 +183,7 @@ static int browser(void* param) #ifdef HAVE_TAGCACHE case GO_TO_DBBROWSER: last_db_dirlevel = tc->dirlevel; + last_db_selection = tc->selected_item; break; #endif } diff --git a/apps/tree.c b/apps/tree.c index e4237dc598..d58c05deb7 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -632,6 +632,7 @@ int dirbrowse() if (returned_button == ACTION_STD_CANCEL) button = ACTION_STD_CANCEL; + tc.selected_item = gui_synclist_get_sel_pos(&tree_lists); switch ( button ) { case ACTION_STD_OK: /* nothing to do if no files to display */ @@ -933,7 +934,6 @@ int dirbrowse() } if(need_update) { - tc.selected_item = gui_synclist_get_sel_pos(&tree_lists); need_update=false; if ( numentries > 0 ) { /* Voice the file if changed */