From 1d7dd0edfdb96c0701289fb008986ee572292dec Mon Sep 17 00:00:00 2001
From: Roxy-3D <Roxy-3D@users.noreply.github.com>
Date: Thu, 21 Jun 2018 13:26:20 -0500
Subject: [PATCH] Add the move_z_after_probing() functionality to UBL's G29 J

---
 Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
index 7ebcd78cefb..c7c0352dfd3 100644
--- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
+++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
@@ -1562,7 +1562,12 @@
             incremental_LSF(&lsf_results, PROBE_PT_3_X, PROBE_PT_3_Y, measured_z);
           }
         }
-
+        
+        STOW_PROBE();
+        #ifdef Z_AFTER_PROBING
+          move_z_after_probing();
+        #endif
+        
         if (abort_flag) {
           SERIAL_ECHOPGM("?Error probing point.  Aborting operation.\n");
           return;
@@ -1618,9 +1623,12 @@
 
           zig_zag ^= true;
         }
-        STOW_PROBE();
       }
-
+      STOW_PROBE();
+      #ifdef Z_AFTER_PROBING
+        move_z_after_probing();
+      #endif
+      
       if (abort_flag || finish_incremental_LSF(&lsf_results)) {
         SERIAL_ECHOPGM("Could not complete LSF!");
         return;