From 85a1c2974d80030922a5437e0d1283a95aa3e56f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 7 Apr 2019 00:54:12 +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. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/538085ca6d83c11c647559d7667af362e58e62e3 Author: Thilo Graf Date: 2019-04-07 (Sun, 07 Apr 2019) ------------------ This commit was generated by Migit --- 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 84fee7b77..a892afce9 100644 --- a/src/gui/osd_setup.cpp +++ b/src/gui/osd_setup.cpp @@ -709,7 +709,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 066d99e65..d5d20b4f4 100644 --- a/src/gui/widget/menue.cpp +++ b/src/gui/widget/menue.cpp @@ -38,7 +38,7 @@ #include #include #include - +#include #include #include @@ -702,6 +702,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)