From 93d5b945dd56a6632395522f6c049e942e4b0166 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 5 Nov 2018 05:12:56 -0600 Subject: [PATCH] Hide mesh editing until a valid mesh exists --- Marlin/src/lcd/menu/menu_bed_leveling.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Marlin/src/lcd/menu/menu_bed_leveling.cpp b/Marlin/src/lcd/menu/menu_bed_leveling.cpp index 69bb2e8fa6..9d51151fe9 100644 --- a/Marlin/src/lcd/menu/menu_bed_leveling.cpp +++ b/Marlin/src/lcd/menu/menu_bed_leveling.cpp @@ -206,7 +206,7 @@ sync_plan_position(); } - void menu_mbl_edit_mesh() { + void menu_edit_mesh() { static uint8_t xind, yind; // =0 START_MENU(); MENU_BACK(MSG_BED_LEVELING); @@ -253,7 +253,8 @@ void menu_bed_leveling() { #endif #if ENABLED(MESH_EDIT_MENU) - MENU_ITEM(submenu, MSG_EDIT_MESH, menu_mbl_edit_mesh); + if (leveling_is_valid()) + MENU_ITEM(submenu, MSG_EDIT_MESH, menu_edit_mesh); #endif // Homed and leveling is valid? Then leveling can be toggled.