From 7d5cd7e0d785822ffc0d63ae68b30f98c25911ce Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 1 May 2017 16:16:16 -0500 Subject: [PATCH] Tweak set_bed_leveling_enabled --- Marlin/Marlin_main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index cfc5ea40bd..023f1f78f5 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2424,7 +2424,12 @@ static void clean_up_after_endstop_or_probe_move() { if (enable && mbl.has_mesh()) planner.unapply_leveling(current_position); } - #elif HAS_ABL && !ENABLED(AUTO_BED_LEVELING_UBL) + #elif ENABLED(AUTO_BED_LEVELING_UBL) + + ubl.state.active = enable; + //set_current_from_steppers_for_axis(Z_AXIS); + + #elif HAS_ABL #if ENABLED(AUTO_BED_LEVELING_BILINEAR) const bool can_change = (!enable || (bilinear_grid_spacing[0] && bilinear_grid_spacing[1])); @@ -2452,9 +2457,6 @@ static void clean_up_after_endstop_or_probe_move() { else planner.unapply_leveling(current_position); } - #elif ENABLED(AUTO_BED_LEVELING_UBL) - ubl.state.active = enable; - //set_current_from_steppers_for_axis(Z_AXIS); #endif }