Only flush the directory of the theme in question.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "ThemeManager.h"
|
#include "ThemeManager.h"
|
||||||
|
#include "RageFileManager.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "RageException.h"
|
#include "RageException.h"
|
||||||
#include "RageTimer.h"
|
#include "RageTimer.h"
|
||||||
@@ -596,7 +597,10 @@ try_element_again:
|
|||||||
|
|
||||||
if( asElementPaths.size() > 1 )
|
if( asElementPaths.size() > 1 )
|
||||||
{
|
{
|
||||||
FlushDirCache();
|
/* Why do we flush here? Aborting ends, retrying calls ReloadMetrics which will flush
|
||||||
|
* and ignoring doesn't do anything further, nothing that would seem to require
|
||||||
|
* flushing the cache. -- Steve */
|
||||||
|
FILEMAN->FlushDirCache( GetThemeDirFromName(sThemeName) );
|
||||||
g_ThemePathCache[category].clear();
|
g_ThemePathCache[category].clear();
|
||||||
|
|
||||||
RString message = ssprintf(
|
RString message = ssprintf(
|
||||||
@@ -785,7 +789,7 @@ bool ThemeManager::HasString( const RString &sClassName, const RString &sValueNa
|
|||||||
static LocalizedString RELOADED_METRICS( "ThemeManager", "Reloaded metrics" );
|
static LocalizedString RELOADED_METRICS( "ThemeManager", "Reloaded metrics" );
|
||||||
void ThemeManager::ReloadMetrics()
|
void ThemeManager::ReloadMetrics()
|
||||||
{
|
{
|
||||||
FlushDirCache();
|
FILEMAN->FlushDirCache( GetCurThemeDir() );
|
||||||
|
|
||||||
// force a reload of the metrics cache
|
// force a reload of the metrics cache
|
||||||
LoadThemeMetrics( g_vThemes, m_sCurThemeName, m_sCurLanguage );
|
LoadThemeMetrics( g_vThemes, m_sCurThemeName, m_sCurLanguage );
|
||||||
|
|||||||
Reference in New Issue
Block a user