File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 2626
2727#include " ../gcode.h"
2828#include " ../../sd/cardreader.h"
29- #include " ../../lcd/marlinui.h"
3029
3130/* *
3231 * M21: Init SD Card
@@ -38,7 +37,6 @@ void GcodeSuite::M21() { card.mount(); }
3837 */
3938void GcodeSuite::M22 () {
4039 if (!IS_SD_PRINTING ()) card.release ();
41- IF_ENABLED (TFT_COLOR_UI, ui.refresh (LCDVIEW_CALL_REDRAW_NEXT));
4240}
4341
4442#endif // SDSUPPORT
Original file line number Diff line number Diff line change @@ -249,7 +249,14 @@ void menu_main() {
249249 #if PIN_EXISTS(SD_DETECT)
250250 GCODES_ITEM (MSG_CHANGE_MEDIA, PSTR (" M21" )); // M21 Change Media
251251 #else // - or -
252- GCODES_ITEM (MSG_RELEASE_MEDIA, PSTR (" M22" )); // M22 Release Media
252+ ACTION_ITEM (MSG_RELEASE_MEDIA, []{ // M22 Release Media
253+ queue.inject (PSTR (" M22" ));
254+ #if ENABLED(TFT_COLOR_UI)
255+ // Menu display issue on item removal with multi language selection menu
256+ if (encoderTopLine > 0 ) encoderTopLine--;
257+ ui.refresh (LCDVIEW_CALL_REDRAW_NEXT);
258+ #endif
259+ });
253260 #endif
254261 SUBMENU (MSG_MEDIA_MENU, MEDIA_MENU_GATEWAY); // Media Menu (or Password First)
255262 }
You can’t perform that action at this time.
0 commit comments