瀏覽代碼

Disable long press handler in modal dialogs (LCD update disabled).

Marek Bel 5 年之前
父節點
當前提交
676434111e
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      Firmware/lcd.cpp

+ 3 - 3
Firmware/lcd.cpp

@@ -783,14 +783,14 @@ void lcd_buttons_update(void)
             safetyTimer.start();
             if ((lcd_button_pressed == 0) && (lcd_long_press_active == 0))
             {
-                //long press is not possible in modal mode
-                if (lcd_update_enabled) longPressTimer.start();
+                longPressTimer.start();
                 lcd_button_pressed = 1;
             }
             else if (longPressTimer.expired(LONG_PRESS_TIME))
             {
                 lcd_long_press_active = 1;
-                if (lcd_longpress_func)
+                //long press is not possible in modal mode
+                if (lcd_longpress_func && lcd_update_enabled)
                     lcd_longpress_func();
             }
         }