From c056c2e3d699c927ac7a939463c11d4a462cb909 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 12 Nov 2020 22:29:35 -0600 Subject: [PATCH] Update marlinui_DOGM.cpp --- Marlin/src/lcd/dogm/marlinui_DOGM.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp index 9dc76178b6..4e265a8ee4 100644 --- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp +++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp @@ -461,11 +461,8 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop void MenuItem_sdbase::draw(const bool sel, const uint8_t row, PGM_P const, CardReader &theCard, const bool isDir) { if (mark_as_selected(row, sel)) { - uint8_t maxlen = LCD_WIDTH; - if (isDir) { - lcd_put_wchar(LCD_STR_FOLDER[0]); - maxlen--; - } + const uint8_t maxlen = LCD_WIDTH - isDir; + if (isDir) lcd_put_wchar(LCD_STR_FOLDER[0]); const pixel_len_t pixw = maxlen * (MENU_FONT_WIDTH); pixel_len_t n = pixw - lcd_put_u8str_max(ui.scrolled_filename(theCard, maxlen, row, sel), pixw); while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');