Fix the database browser not remembering its selected item
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12705 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a990ff2920
commit
fd30be5545
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue