瀏覽代碼

Add the missed {} to END_MENU in ultralcd.cpp

what caused an extra update of encoderLine most of the time.
AnHardt 9 年之前
父節點
當前提交
8848b7e9ef
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      Marlin/ultralcd.cpp

+ 1
- 1
Marlin/ultralcd.cpp 查看文件

@@ -204,7 +204,7 @@ static void menu_action_setting_edit_callback_long5(const char* pstr, unsigned l
204 204
   #define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, args...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## args)
205 205
 #endif //!ENCODER_RATE_MULTIPLIER
206 206
 #define END_MENU() \
207
-    if (encoderLine >= _menuItemNr) encoderPosition = _menuItemNr * ENCODER_STEPS_PER_MENU_ITEM - 1; encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM;\
207
+    if (encoderLine >= _menuItemNr) { encoderPosition = _menuItemNr * ENCODER_STEPS_PER_MENU_ITEM - 1; encoderLine = encoderPosition / ENCODER_STEPS_PER_MENU_ITEM; }\
208 208
     if (encoderLine >= currentMenuViewOffset + LCD_HEIGHT) { currentMenuViewOffset = encoderLine - LCD_HEIGHT + 1; lcdDrawUpdate = 1; _lineNr = currentMenuViewOffset - 1; _drawLineNr = -1; } \
209 209
     } } while(0)
210 210
 

Loading…
取消
儲存