From 87948915995c0d2752a3aaa80d470ee7e5366902 Mon Sep 17 00:00:00 2001 From: kamel5 Date: Fri, 18 Oct 2019 14:32:33 +0200 Subject: [PATCH] Fixed a error while changing a Theme --- config.c | 5 ++++- config.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config.c b/config.c index f4f12f7..56eb831 100644 --- a/config.c +++ b/config.c @@ -95,6 +95,7 @@ cTVGuideConfig::cTVGuideConfig() { FontRecMenuItemLargeDelta = 0; timeFormat = 1; useNopacityTheme = 1; + useNopacityThemeCurrent = -1; themeIndex = -1; themeIndexCurrent = -1; themeName = ""; @@ -124,13 +125,14 @@ bool cTVGuideConfig::LoadTheme() { //is correct theme already loaded? if (nOpacityTheme.size() == 0) nOpacityTheme = Setup.OSDTheme; - if ((themeIndex > -1) && (themeIndex == themeIndexCurrent)) { + if ((themeIndex > -1) && (themeIndex == themeIndexCurrent) && (useNopacityTheme == useNopacityThemeCurrent)) { if (!nOpacityTheme.compare(Setup.OSDTheme)) { return false; } else { nOpacityTheme = Setup.OSDTheme; } } + esyslog("tvguide: loading new Theme"); //Load available Themes cThemes themes; themes.Load(*cString("tvguide")); @@ -167,6 +169,7 @@ bool cTVGuideConfig::LoadTheme() { themeIndex = 0; themeIndexCurrent = themeIndex; + useNopacityThemeCurrent = useNopacityTheme; const char *themePath = themes.FileName(themeIndex); if (access(themePath, F_OK) == 0) { diff --git a/config.h b/config.h index dd818b9..277c637 100644 --- a/config.h +++ b/config.h @@ -149,6 +149,7 @@ class cTVGuideConfig { int FontRecMenuItemLargeDelta; int timeFormat; int useNopacityTheme; + int useNopacityThemeCurrent; int themeIndex; int themeIndexCurrent; cString themeName;