From 4153b6a30b0fdf1c215cc488db384bfa24a43720 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Mon, 1 Feb 2021 01:15:14 +0100 Subject: [PATCH] Refresh screen on M22 (detach) (#20958) --- Marlin/src/gcode/sd/M21_M22.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/sd/M21_M22.cpp b/Marlin/src/gcode/sd/M21_M22.cpp index a618bc0be..f42784d8e 100644 --- a/Marlin/src/gcode/sd/M21_M22.cpp +++ b/Marlin/src/gcode/sd/M21_M22.cpp @@ -26,6 +26,7 @@ #include "../gcode.h" #include "../../sd/cardreader.h" +#include "../../lcd/marlinui.h" /** * M21: Init SD Card @@ -36,9 +37,8 @@ void GcodeSuite::M21() { card.mount(); } * M22: Release SD Card */ void GcodeSuite::M22() { - if (!IS_SD_PRINTING()) card.release(); - + IF_ENABLED(TFT_COLOR_UI, ui.refresh(LCDVIEW_CALL_REDRAW_NEXT)); } #endif // SDSUPPORT