From 60d6fd63b108c18102f41734aebbece62715a2a5 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Mon, 13 Nov 2017 10:10:45 +0100 Subject: [PATCH] - vfd-setup: hide statusline option from models w/o a statusline in vfd Signed-off-by: Thilo Graf --- src/gui/vfd_setup.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gui/vfd_setup.cpp b/src/gui/vfd_setup.cpp index d43759e2a..64852009b 100644 --- a/src/gui/vfd_setup.cpp +++ b/src/gui/vfd_setup.cpp @@ -149,10 +149,14 @@ int CVfdSetup::showSetup() vfds->addItem(GenericMenuSeparatorLine); } - //status line options - CMenuOptionChooser* oj = new CMenuOptionChooser(LOCALE_LCDMENU_STATUSLINE, &g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME], LCDMENU_STATUSLINE_OPTIONS, LCDMENU_STATUSLINE_OPTION_COUNT, vfd_enabled); - oj->setHint("", LOCALE_MENU_HINT_VFD_STATUSLINE); - vfds->addItem(oj); + CMenuOptionChooser* oj; + if (g_info.hw_caps->display_has_statusline) + { + //status line options + oj = new CMenuOptionChooser(LOCALE_LCDMENU_STATUSLINE, &g_settings.lcd_setting[SNeutrinoSettings::LCD_SHOW_VOLUME], LCDMENU_STATUSLINE_OPTIONS, LCDMENU_STATUSLINE_OPTION_COUNT, vfd_enabled); + oj->setHint("", LOCALE_MENU_HINT_VFD_STATUSLINE); + vfds->addItem(oj); + } //info line options oj = new CMenuOptionChooser(LOCALE_LCD_INFO_LINE, &g_settings.lcd_info_line, LCD_INFO_OPTIONS, LCD_INFO_OPTION_COUNT, vfd_enabled);