From 057d458f960fe8a9002f85baad68aa70f1d3f8f7 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 6 Apr 2019 23:35:34 +0200 Subject: [PATCH] osd_setup/menue.cpp: remove slot OnAfterChangeOption from OsdSetup class Effect was right only for the osd_menu widget but not for all the other opened menu widget instances. This was watched if user the osd setup menu has lefted with the 'Setup' ('Menu') button. The main menu was not touched. Thx GetAway for hint. The use of slot in context with the OsdHelpers class should solve this issue for all new generated menu widget instances. --- src/gui/osd_setup.cpp | 1 - src/gui/widget/menue.cpp | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/osd_setup.cpp b/src/gui/osd_setup.cpp index 202f95b8c..486990d5e 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -707,7 +707,6 @@ int COsdSetup::showOsdSetup() (g_settings.video_Mode != VIDEO_STD_AUTO)); CMenuOptionChooser * osd_res = new CMenuOptionChooser(LOCALE_COLORMENU_OSD_RESOLUTION, &g_settings.osd_resolution, kext, resCount, enable, this); osd_res->OnAfterChangeOption.connect(sigc::mem_fun(frameBuffer->getInstance(), &CFrameBuffer::clearIconCache)); - osd_res->OnAfterChangeOption.connect(sigc::mem_fun(osd_menu, &CMenuWidget::ResetModules)); osd_res->setHint("", LOCALE_MENU_HINT_OSD_RESOLUTION); osd_menu->addItem(osd_res); #endif diff --git a/src/gui/widget/menue.cpp b/src/gui/widget/menue.cpp index df9948691..bddd0a191 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -38,7 +38,7 @@ #include #include #include - +#include #include #include @@ -704,6 +704,8 @@ void CMenuWidget::Init(const std::string &NameString, const std::string &Icon, c if(min_width > (int) frameBuffer->getScreenWidth()) min_width = frameBuffer->getScreenWidth(); } + + COsdHelpers::getInstance()->OnAfterChangeResolution.connect(sigc::mem_fun(this, &CMenuWidget::ResetModules)); } void CMenuWidget::move(int xoff, int yoff)