From 2af559cca3bcb082b4307328ffb74988087759be Mon Sep 17 00:00:00 2001
From: Scott Lahteine <sourcetree@thinkyhead.com>
Date: Mon, 23 Feb 2015 20:31:28 -0800
Subject: [PATCH] Shared function for menu_edit_* and menu_edit_callback_*

---
 Marlin/ultralcd.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/Marlin/ultralcd.cpp b/Marlin/ultralcd.cpp
index c5f564f32f..2726547034 100644
--- a/Marlin/ultralcd.cpp
+++ b/Marlin/ultralcd.cpp
@@ -1025,7 +1025,7 @@ void lcd_sdcard_menu() {
 }
 
 #define menu_edit_type(_type, _name, _strFunc, scale) \
-  bool menu_edit_ ## _name () { \
+  bool _menu_edit_ ## _name () { \
     bool isClicked = LCD_CLICKED; \
     if ((int32_t)encoderPosition < 0) encoderPosition = 0; \
     if ((int32_t)encoderPosition > maxEditValue) encoderPosition = maxEditValue; \
@@ -1037,9 +1037,8 @@ void lcd_sdcard_menu() {
     } \
     return isClicked; \
   } \
-  void menu_edit_callback_ ## _name () { \
-    if (menu_edit_ ## _name ()) (*callbackFunc)(); \
-  } \
+  void menu_edit_ ## _name () { _menu_edit_ ## _name(); } \
+  void menu_edit_callback_ ## _name () { if (_menu_edit_ ## _name ()) (*callbackFunc)(); } \
   static void _menu_action_setting_edit_ ## _name (const char* pstr, _type* ptr, _type minValue, _type maxValue) { \
     prevMenu = currentMenu; \
     prevEncoderPosition = encoderPosition; \
-- 
GitLab