diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index c5e45899a19d..e4e419dd767f 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -729,14 +729,11 @@ void do_blocking_move_to(const xyze_pos_t &raw, const_feedRate_t fr_mm_s/*=0.0f* } void do_move_after_z_homing() { DEBUG_SECTION(mzah, "do_move_after_z_homing", DEBUGGING(LEVELING)); - float zpos = 0; - #ifdef Z_POST_CLEARANCE // (is always defined) - NOLESS(zpos, Z_POST_CLEARANCE); + #if defined(Z_AFTER_HOMING) || ALL(DWIN_LCD_PROUI, INDIVIDUAL_AXIS_HOMING_SUBMENU, MESH_BED_LEVELING) + do_z_clearance(Z_POST_CLEARANCE, true, true); + #elif ENABLED(USE_PROBE_FOR_Z_HOMING) + probe.move_z_after_probing(); #endif - #if ENABLED(USE_PROBE_FOR_Z_HOMING) - NOLESS(zpos, Z_AFTER_PROBING); - #endif - if (zpos) do_z_clearance(zpos, true, true); } #endif