Fixed a error while changing a Theme

This commit is contained in:
kamel5 2019-10-18 14:32:33 +02:00
parent cd62a9bd6b
commit 8794891599
2 changed files with 5 additions and 1 deletions

View File

@ -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) {

View File

@ -149,6 +149,7 @@ class cTVGuideConfig {
int FontRecMenuItemLargeDelta;
int timeFormat;
int useNopacityTheme;
int useNopacityThemeCurrent;
int themeIndex;
int themeIndexCurrent;
cString themeName;