From daa8fff6c630da27bed2df7bd30c38e7e359c0e8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 12 Dec 2021 16:16:40 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20SD=20abort=20requires=20open=20f?= =?UTF-8?q?ile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See #22566 --- Marlin/src/sd/cardreader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/sd/cardreader.h b/Marlin/src/sd/cardreader.h index 97003e1d13..53e1a7ffc3 100644 --- a/Marlin/src/sd/cardreader.h +++ b/Marlin/src/sd/cardreader.h @@ -163,7 +163,7 @@ public: static void endFilePrintNow(TERN_(SD_RESORT, const bool re_sort=false)); static void abortFilePrintNow(TERN_(SD_RESORT, const bool re_sort=false)); static void fileHasFinished(); - static inline void abortFilePrintSoon() { flag.abort_sd_printing = true; } + static inline void abortFilePrintSoon() { flag.abort_sd_printing = isFileOpen(); } static inline void pauseSDPrint() { flag.sdprinting = false; } static inline bool isPrinting() { return flag.sdprinting; } static inline bool isPaused() { return isFileOpen() && !isPrinting(); }