From 12a4fa55ac56b5b16c6cd742c47ae0257902dd27 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 5 Jan 2005 04:31:36 +0000 Subject: [PATCH] update metrics when the subscribe if a theme is already loaded --- stepmania/src/ThemeManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 505e86d4fa..c35abdf223 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -66,6 +66,14 @@ void ThemeManager::Subscribe( IThemeMetric *p ) if( g_pvpSubscribers == NULL ) g_pvpSubscribers = new vector; 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 )