From b8fe3bbd6de5141d38295f0d7a4937d4ef903726 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 16 May 2020 21:14:04 -0500 Subject: [PATCH] Fix position sync on M420 S0 --- Marlin/src/gcode/bedlevel/M420.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/M420.cpp b/Marlin/src/gcode/bedlevel/M420.cpp index 3effc3173b..50b2f6f158 100644 --- a/Marlin/src/gcode/bedlevel/M420.cpp +++ b/Marlin/src/gcode/bedlevel/M420.cpp @@ -84,12 +84,12 @@ void GcodeSuite::M420() { } #endif + xyz_pos_t oldpos = current_position; + // If disabling leveling do it right away // (Don't disable for just M420 or M420 V) if (seen_S && !to_enable) set_bed_leveling_enabled(false); - xyz_pos_t oldpos = current_position; - #if ENABLED(AUTO_BED_LEVELING_UBL) // L to load a mesh from the EEPROM