0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-18 23:49:49 +00:00

🧑‍💻 Tweak an 'if' block (#26300)

This commit is contained in:
Vovodroid 2023-10-07 04:03:02 +03:00 committed by GitHub
parent 821ba43131
commit b3b6f23320
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,16 +126,18 @@ void menu_media_filelist() {
else if (card.isMounted()) else if (card.isMounted())
ACTION_ITEM_F(F(LCD_STR_FOLDER " .."), lcd_sd_updir); ACTION_ITEM_F(F(LCD_STR_FOLDER " .."), lcd_sd_updir);
if (ui.should_draw()) for (int16_t i = 0; i < fileCnt; i++) { if (ui.should_draw()) {
if (_menuLineNr == _thisItemNr) { for (int16_t i = 0; i < fileCnt; i++) {
card.selectFileByIndexSorted(i); if (_menuLineNr != _thisItemNr)
if (card.flag.filenameIsDir) SKIP_ITEM();
MENU_ITEM(sdfolder, MSG_MEDIA_MENU, card); else {
else card.selectFileByIndexSorted(i);
MENU_ITEM(sdfile, MSG_MEDIA_MENU, card); if (card.flag.filenameIsDir)
MENU_ITEM(sdfolder, MSG_MEDIA_MENU, card);
else
MENU_ITEM(sdfile, MSG_MEDIA_MENU, card);
}
} }
else
SKIP_ITEM();
} }
END_MENU(); END_MENU();
} }