diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 4fb4a39f7..c546fc229 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -8608,7 +8608,6 @@ inline void gcode_M121() { endstops.enable_globally(false); } * Z = override Z raise */ inline void gcode_M125() { - point_t park_point = NOZZLE_PARK_POINT; // Initial retract before move to filament change position const float retract = parser.seen('L') ? parser.value_axis_units(E_AXIS) : 0 @@ -8617,16 +8616,14 @@ inline void gcode_M121() { endstops.enable_globally(false); } #endif ; - // Lift Z axis - if (parser.seenval('Z')) - park_point.z = parser.linearval('Z'); + point_t park_point = NOZZLE_PARK_POINT; // Move XY axes to filament change position or given position - if (parser.seenval('X')) - park_point.x = parser.linearval('X'); + if (parser.seenval('X')) park_point.x = parser.linearval('X'); + if (parser.seenval('Y')) park_point.y = parser.linearval('Y'); - if (parser.seenval('Y')) - park_point.y = parser.linearval('Y'); + // Lift Z axis + if (parser.seenval('Z')) park_point.z = parser.linearval('Z'); #if HOTENDS > 1 && DISABLED(DUAL_X_CARRIAGE) park_point.x += (active_extruder ? hotend_offset[X_AXIS][active_extruder] : 0);