diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/tree.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/tree.c b/apps/tree.c index e09492946b..5d9277e570 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -482,10 +482,6 @@ bool dirbrowse(char *root) | |||
482 | #ifdef HAVE_LCD_BITMAP | 482 | #ifdef HAVE_LCD_BITMAP |
483 | if(global_settings.statusbar) { | 483 | if(global_settings.statusbar) { |
484 | statusbar_toggle(); | 484 | statusbar_toggle(); |
485 | if(CURSOR_Y+LINE_Y+dircursor>TREE_MAX_ON_SCREEN) { | ||
486 | start++; | ||
487 | dircursor--; | ||
488 | } | ||
489 | restore = true; | 485 | restore = true; |
490 | } | 486 | } |
491 | #endif | 487 | #endif |
@@ -520,6 +516,12 @@ bool dirbrowse(char *root) | |||
520 | 516 | ||
521 | if ( restore ) { | 517 | if ( restore ) { |
522 | /* restore display */ | 518 | /* restore display */ |
519 | /* We need to adjust if the number of lines on screen have | ||
520 | changed because of a status bar change */ | ||
521 | if(CURSOR_Y+LINE_Y+dircursor>TREE_MAX_ON_SCREEN) { | ||
522 | start++; | ||
523 | dircursor--; | ||
524 | } | ||
523 | numentries = showdir(currdir, start); | 525 | numentries = showdir(currdir, start); |
524 | put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true); | 526 | put_cursorxy(0, CURSOR_Y + LINE_Y+dircursor, true); |
525 | } | 527 | } |