update metrics when the subscribe if a theme is already loaded
This commit is contained in:
@@ -66,6 +66,14 @@ void ThemeManager::Subscribe( IThemeMetric *p )
|
|||||||
if( g_pvpSubscribers == NULL )
|
if( g_pvpSubscribers == NULL )
|
||||||
g_pvpSubscribers = new vector<IThemeMetric*>;
|
g_pvpSubscribers = new vector<IThemeMetric*>;
|
||||||
g_pvpSubscribers->push_back( p );
|
g_pvpSubscribers->push_back( p );
|
||||||
|
|
||||||
|
|
||||||
|
// It's ThemeManager's responsibility to make sure all of it's subscribers
|
||||||
|
// are updated with current data. If a metric is created after
|
||||||
|
// a theme is loaded, ThemeManager should update it right away (not just
|
||||||
|
// when the theme changes).
|
||||||
|
if( THEME && THEME->GetCurThemeName().size() )
|
||||||
|
p->Read();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThemeManager::Unsubscribe( IThemeMetric *p )
|
void ThemeManager::Unsubscribe( IThemeMetric *p )
|
||||||
|
|||||||
Reference in New Issue
Block a user