diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2021-12-27 22:28:41 +0100 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-12-28 10:57:13 -0500 |
commit | 7d59bbd170454cf433a8214808d09fb58f3489d2 (patch) | |
tree | 2507d1a51119162fd0c24ef69bff64a9278744b8 | |
parent | 96cfe329a612a8da5878f7bc20f2d645b30553a3 (diff) | |
download | rockbox-7d59bbd170.tar.gz rockbox-7d59bbd170.zip |
Database: Fix selection being reset
Consistent with (preferable) behavior of file browser
after selecting an item for playback
Change-Id: I45a72f6d743fd70c301f9d5de0f8a2a02157b2c6
-rw-r--r-- | apps/tagtree.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c index 74f0021d6a..696ba81487 100644 --- a/apps/tagtree.c +++ b/apps/tagtree.c @@ -1846,6 +1846,8 @@ int tagtree_enter(struct tree_context* c) tree_lock_cache(c); tagtree_lock(); + bool reset_selection = true; + switch (c->currtable) { case ROOT: c->currextra = newextra; @@ -1931,6 +1933,8 @@ int tagtree_enter(struct tree_context* c) case ALLSUBENTRIES: if (newextra == PLAYTRACK) { + reset_selection = false; + if (global_settings.party_mode && audio_status()) { splash(HZ, ID2P(LANG_PARTY_MODE)); break; @@ -1962,9 +1966,12 @@ int tagtree_enter(struct tree_context* c) break; } + if (reset_selection) + { + c->selected_item=0; + gui_synclist_select_item(&tree_lists, c->selected_item); + } - c->selected_item=0; - gui_synclist_select_item(&tree_lists, c->selected_item); tree_unlock_cache(c); tagtree_unlock(); |