diff options
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/tree.c b/apps/tree.c index 5122f55a82..fb2ed8d320 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -552,7 +552,7 @@ static int dirbrowse() | |||
552 | int numentries=0; | 552 | int numentries=0; |
553 | char buf[MAX_PATH]; | 553 | char buf[MAX_PATH]; |
554 | int lasti = -1; | 554 | int lasti = -1; |
555 | unsigned button, returned_button; | 555 | unsigned button, oldbutton; |
556 | bool reload_root = false; | 556 | bool reload_root = false; |
557 | int lastfilter = *tc.dirfilter; | 557 | int lastfilter = *tc.dirfilter; |
558 | bool lastsortcase = global_settings.sort_case; | 558 | bool lastsortcase = global_settings.sort_case; |
@@ -605,12 +605,8 @@ static int dirbrowse() | |||
605 | } | 605 | } |
606 | #endif | 606 | #endif |
607 | button = get_action(CONTEXT_TREE,HZ/5); | 607 | button = get_action(CONTEXT_TREE,HZ/5); |
608 | returned_button = gui_synclist_do_button(&tree_lists, button,LIST_WRAP_UNLESS_HELD); | 608 | oldbutton = button; |
609 | if (returned_button) | 609 | need_update = gui_synclist_do_button(&tree_lists, &button,LIST_WRAP_UNLESS_HELD); |
610 | need_update = true; | ||
611 | if (returned_button == ACTION_STD_CANCEL) | ||
612 | button = ACTION_STD_CANCEL; | ||
613 | |||
614 | tc.selected_item = gui_synclist_get_sel_pos(&tree_lists); | 610 | tc.selected_item = gui_synclist_get_sel_pos(&tree_lists); |
615 | switch ( button ) { | 611 | switch ( button ) { |
616 | case ACTION_STD_OK: | 612 | case ACTION_STD_OK: |
@@ -640,9 +636,11 @@ static int dirbrowse() | |||
640 | if ((*tc.dirfilter == SHOW_ID3DB && tc.dirlevel == 0) || | 636 | if ((*tc.dirfilter == SHOW_ID3DB && tc.dirlevel == 0) || |
641 | ((*tc.dirfilter != SHOW_ID3DB && !strcmp(currdir,"/")))) | 637 | ((*tc.dirfilter != SHOW_ID3DB && !strcmp(currdir,"/")))) |
642 | { | 638 | { |
643 | if (returned_button == ACTION_STD_CANCEL) | 639 | #ifdef HAVE_LCD_BITMAP /* charcell doesnt have ACTION_TREE_PGLEFT so this isnt needed */ |
640 | if (oldbutton == ACTION_TREE_PGLEFT) | ||
644 | break; | 641 | break; |
645 | else | 642 | else |
643 | #endif | ||
646 | return GO_TO_ROOT; | 644 | return GO_TO_ROOT; |
647 | } | 645 | } |
648 | 646 | ||