- if( mThemeFile.compare(DEFAULT_THEME) == 0 && mThemeBuilder )
- {
- // We have already loaded the default theme into mThemeBuilder
- }
- else
+ // If we haven't loaded a theme, or the stored theme file is empty, or
+ // the previously loaded theme is different to the requested theme,
+ // first reset the builder and load the default theme.
+ if( ! mThemeBuilder || mThemeFile.empty() || mThemeFile.compare( themeFile ) != 0 )