Revert File list refactoring a253776
.
This commit is contained in:
@@ -646,28 +646,35 @@
|
|||||||
|
|
||||||
void AnycubicTouchscreenClass::RenderCurrentFileList() {
|
void AnycubicTouchscreenClass::RenderCurrentFileList() {
|
||||||
currentFileOrDirectory[0] = 0;
|
currentFileOrDirectory[0] = 0;
|
||||||
uint16_t selectedNumber = 0;
|
|
||||||
FileList currentFileList;
|
if (SpecialMenu == false) {
|
||||||
|
currentTouchscreenSelection[0] = 0;
|
||||||
if (CodeSeen('S')) selectedNumber = CodeValue();
|
}
|
||||||
|
|
||||||
// Filelist start
|
// Filelist start
|
||||||
SEND_PGM("FN ");
|
SEND_PGM("FN ");
|
||||||
SENDLINE_PGM("");
|
SENDLINE_PGM("");
|
||||||
|
|
||||||
if (SpecialMenu) {
|
if (!isMediaInserted() && !SpecialMenu) {
|
||||||
RenderSpecialMenu(selectedNumber);
|
|
||||||
} else if (isMediaInserted() && (selectedNumber <= currentFileList.count())) {
|
|
||||||
currentTouchscreenSelection[0] = 0;
|
|
||||||
RenderCurrentFolder(selectedNumber);
|
|
||||||
} else {
|
|
||||||
SENDLINE_PGM(SM_SPECIAL_MENU_S);
|
SENDLINE_PGM(SM_SPECIAL_MENU_S);
|
||||||
SENDLINE_PGM(SM_SPECIAL_MENU_L);
|
SENDLINE_PGM(SM_SPECIAL_MENU_L);
|
||||||
}
|
} else {
|
||||||
|
uint16_t selectedNumber = 0;
|
||||||
|
FileList currentFileList;
|
||||||
|
|
||||||
SEND_PGM("END");
|
if (CodeSeen('S')) {
|
||||||
SENDLINE_PGM("");
|
selectedNumber = CodeValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SpecialMenu) {
|
||||||
|
RenderSpecialMenu(selectedNumber);
|
||||||
|
} else if (selectedNumber <= currentFileList.count()) {
|
||||||
|
RenderCurrentFolder(selectedNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
// Filelist stop
|
// Filelist stop
|
||||||
|
SEND_PGM("END");
|
||||||
|
SENDLINE_PGM("");
|
||||||
}
|
}
|
||||||
|
|
||||||
void AnycubicTouchscreenClass::RenderSpecialMenu(uint16_t selectedNumber) {
|
void AnycubicTouchscreenClass::RenderSpecialMenu(uint16_t selectedNumber) {
|
||||||
|
Reference in New Issue
Block a user