From f642d8b79e5eb1dc7ee63ff0a1c133ffa0cf63fd Mon Sep 17 00:00:00 2001 From: Bob Anthony <42719046+bob-anthony@users.noreply.github.com> Date: Tue, 3 Aug 2021 23:45:08 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20extra=20E=20move=20in=20to?= =?UTF-8?q?olchange=20with=20...=5FNO=5FRETURN=20(#22504)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/module/tool_change.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 5b478caa1a..6d69b8722d 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -954,11 +954,11 @@ void fast_line_to_current(const AxisEnum fr_axis) { _line_to_current(fr_axis, 0. #if ENABLED(TOOLCHANGE_PARK) if (ok) { #if ENABLED(TOOLCHANGE_NO_RETURN) - destination.set(current_position.x, current_position.y); - prepare_internal_move_to_destination(planner.settings.max_feedrate_mm_s[Z_AXIS]); - #else - prepare_internal_move_to_destination(MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE)); + const float temp = destination.z; + destination = current_position; + destination.z = temp.z; #endif + prepare_internal_move_to_destination(TERN(TOOLCHANGE_NO_RETURN, planner.settings.max_feedrate_mm_s[Z_AXIS], MMM_TO_MMS(TOOLCHANGE_PARK_XY_FEEDRATE))); } #endif