From 1c3d49afe0228668edb174acd1be5ff48cbf6c5f Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Sun, 22 Apr 2018 01:23:26 -0500
Subject: [PATCH] Fix G28 with Z_AFTER_PROBING

Fix #10476
---
 Marlin/src/gcode/calibrate/G28.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp
index 5fc0aaf15a..17f3ea7474 100644
--- a/Marlin/src/gcode/calibrate/G28.cpp
+++ b/Marlin/src/gcode/calibrate/G28.cpp
@@ -311,10 +311,12 @@ void GcodeSuite::G28(const bool always_home_all) {
         #else
           HOMEAXIS(Z);
         #endif
+
+        #if HOMING_Z_WITH_PROBE && Z_AFTER_PROBING
+          move_z_after_probing();
+        #endif
+
       } // home_all || homeZ
-      #if HOMING_Z_WITH_PROBE && Z_AFTER_PROBING
-        move_z_after_probing();
-      #endif
     #endif // Z_HOME_DIR < 0
 
     SYNC_PLAN_POSITION_KINEMATIC();
-- 
GitLab