From 3e53754ccfb8794777c70b2a450a767e865eb07a Mon Sep 17 00:00:00 2001
From: Scott Lahteine <github@thinkyhead.com>
Date: Mon, 30 Apr 2018 02:59:11 -0500
Subject: [PATCH] Allow Z_AFTER_PROBING to be 0

---
 Marlin/Marlin.h        |  2 +-
 Marlin/Marlin_main.cpp | 12 ++++++------
 Marlin/ubl_G29.cpp     |  2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h
index aadbbdaf24..40b101fb4f 100644
--- a/Marlin/Marlin.h
+++ b/Marlin/Marlin.h
@@ -388,7 +388,7 @@ void report_current_position();
 #if HAS_BED_PROBE
   extern float zprobe_zoffset;
   bool set_probe_deployed(const bool deploy);
-  #if Z_AFTER_PROBING
+  #ifdef Z_AFTER_PROBING
     void move_z_after_probing();
   #endif
   enum ProbePtRaise : unsigned char {
diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp
index bd0a39198d..b0e9b93e76 100644
--- a/Marlin/Marlin_main.cpp
+++ b/Marlin/Marlin_main.cpp
@@ -3936,7 +3936,7 @@ inline void gcode_G4() {
 
 #endif // DELTA
 
-#if Z_AFTER_PROBING
+#ifdef Z_AFTER_PROBING
   void move_z_after_probing() {
     if (current_position[Z_AXIS] != Z_AFTER_PROBING) {
       do_blocking_move_to_z(Z_AFTER_PROBING);
@@ -4180,7 +4180,7 @@ inline void gcode_G28(const bool always_home_all) {
           HOMEAXIS(Z);
         #endif
 
-        #if HOMING_Z_WITH_PROBE && Z_AFTER_PROBING
+        #if HOMING_Z_WITH_PROBE && defined(Z_AFTER_PROBING)
           move_z_after_probing();
         #endif
 
@@ -5356,7 +5356,7 @@ void home_all_axes() { gcode_G28(true); }
     if (planner.leveling_active)
       SYNC_PLAN_POSITION_KINEMATIC();
 
-    #if HAS_BED_PROBE && Z_AFTER_PROBING
+    #if HAS_BED_PROBE && defined(Z_AFTER_PROBING)
       move_z_after_probing();
     #endif
 
@@ -5400,7 +5400,7 @@ void home_all_axes() { gcode_G28(true); }
 
     clean_up_after_endstop_or_probe_move();
 
-    #if Z_AFTER_PROBING
+    #ifdef Z_AFTER_PROBING
       if (raise_after == PROBE_PT_STOW) move_z_after_probing();
     #endif
 
@@ -7781,7 +7781,7 @@ inline void gcode_M42() {
       set_bed_leveling_enabled(was_enabled);
     #endif
 
-    #if Z_AFTER_PROBING
+    #ifdef Z_AFTER_PROBING
       move_z_after_probing();
     #endif
 
@@ -9917,7 +9917,7 @@ inline void gcode_M400() { stepper.synchronize(); }
    */
   inline void gcode_M402() {
     STOW_PROBE();
-    #if Z_AFTER_PROBING
+    #ifdef Z_AFTER_PROBING
       move_z_after_probing();
     #endif
     report_current_position();
diff --git a/Marlin/ubl_G29.cpp b/Marlin/ubl_G29.cpp
index e351fb1bac..65fb67c70c 100644
--- a/Marlin/ubl_G29.cpp
+++ b/Marlin/ubl_G29.cpp
@@ -751,7 +751,7 @@
 
       STOW_PROBE();
 
-      #if Z_AFTER_PROBING
+      #ifdef Z_AFTER_PROBING
         move_z_after_probing();
       #endif