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:
parent
821ba43131
commit
b3b6f23320
1 changed files with 11 additions and 9 deletions
|
@ -126,16 +126,18 @@ void menu_media_filelist() {
|
|||
else if (card.isMounted())
|
||||
ACTION_ITEM_F(F(LCD_STR_FOLDER " .."), lcd_sd_updir);
|
||||
|
||||
if (ui.should_draw()) for (int16_t i = 0; i < fileCnt; i++) {
|
||||
if (_menuLineNr == _thisItemNr) {
|
||||
card.selectFileByIndexSorted(i);
|
||||
if (card.flag.filenameIsDir)
|
||||
MENU_ITEM(sdfolder, MSG_MEDIA_MENU, card);
|
||||
else
|
||||
MENU_ITEM(sdfile, MSG_MEDIA_MENU, card);
|
||||
if (ui.should_draw()) {
|
||||
for (int16_t i = 0; i < fileCnt; i++) {
|
||||
if (_menuLineNr != _thisItemNr)
|
||||
SKIP_ITEM();
|
||||
else {
|
||||
card.selectFileByIndexSorted(i);
|
||||
if (card.flag.filenameIsDir)
|
||||
MENU_ITEM(sdfolder, MSG_MEDIA_MENU, card);
|
||||
else
|
||||
MENU_ITEM(sdfile, MSG_MEDIA_MENU, card);
|
||||
}
|
||||
}
|
||||
else
|
||||
SKIP_ITEM();
|
||||
}
|
||||
END_MENU();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue