From a7f5d38da7d6e57d5cfac9358eb13e57fac61db1 Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Fri, 25 Sep 2020 21:58:45 -0300 Subject: [PATCH] Fix MBL "Click to continue" on Color UI touchscreen (#19514) --- Marlin/src/lcd/menu/menu_bed_leveling.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Marlin/src/lcd/menu/menu_bed_leveling.cpp b/Marlin/src/lcd/menu/menu_bed_leveling.cpp index 6841561c1..e19b04ccb 100644 --- a/Marlin/src/lcd/menu/menu_bed_leveling.cpp +++ b/Marlin/src/lcd/menu/menu_bed_leveling.cpp @@ -36,6 +36,11 @@ #include "../../module/probe.h" #endif +#if HAS_GRAPHICAL_TFT + #include "../tft/touch.h" + #include "../tft/tft.h" +#endif + #if EITHER(PROBE_MANUALLY, MESH_BED_LEVELING) #include "../../module/motion.h" @@ -159,7 +164,11 @@ // Move to the first probe position // void _lcd_level_bed_homing_done() { - if (ui.should_draw()) MenuItem_static::draw(1, GET_TEXT(MSG_LEVEL_BED_WAITING)); + if (ui.should_draw()) { + MenuItem_static::draw(1, GET_TEXT(MSG_LEVEL_BED_WAITING)); + // Color UI needs a control to detect a touch + TERN_(HAS_GRAPHICAL_TFT, touch.add_control(CLICK, 0, 0, TFT_WIDTH, TFT_HEIGHT)); + } if (ui.use_click()) { manual_probe_index = 0; _lcd_level_goto_next_point();