fix catalog.xml out of date after reloading songs
This commit is contained in:
@@ -37,7 +37,7 @@ const RString CATALOG_XSL = "Catalog.xsl";
|
||||
const RString CATALOG_XML_FILE = "Save/" + CATALOG_XML;
|
||||
|
||||
static LocalizedString SAVING_CATALOG_XML( "CatalogXml", "Saving %s ..." );
|
||||
void SaveCatalogXml( LoadingWindow *loading_window )
|
||||
void CatalogXml::Save( LoadingWindow *loading_window )
|
||||
{
|
||||
ASSERT( SONGMAN );
|
||||
ASSERT( UNLOCKMAN );
|
||||
|
||||
@@ -9,7 +9,10 @@ extern const RString CATALOG_XML;
|
||||
extern const RString CATALOG_XSL;
|
||||
extern const RString CATALOG_XML_FILE;
|
||||
|
||||
void SaveCatalogXml( LoadingWindow *ld );
|
||||
namespace CatalogXml
|
||||
{
|
||||
void Save( LoadingWindow *ld );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "CourseLoaderCRS.h"
|
||||
#include "TitleSubstitution.h"
|
||||
#include "LocalizedString.h"
|
||||
#include "CatalogXml.h"
|
||||
|
||||
SongManager* SONGMAN = NULL; // global and accessable from anywhere in our program
|
||||
|
||||
@@ -99,6 +100,7 @@ void SongManager::Reload( bool bAllowFastLoad, LoadingWindow *ld )
|
||||
// reload scores and unlocks afterward
|
||||
PROFILEMAN->LoadMachineProfile();
|
||||
UNLOCKMAN->Reload();
|
||||
CatalogXml::Save( NULL );
|
||||
|
||||
if( !bAllowFastLoad )
|
||||
PREFSMAN->m_bFastLoad.Set( OldVal );
|
||||
|
||||
@@ -1063,7 +1063,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
/* This shouldn't need to be here; if it's taking long enough that this is
|
||||
* even visible, we should be fixing it, not showing a progress display. */
|
||||
SaveCatalogXml( loading_window );
|
||||
CatalogXml::Save( loading_window );
|
||||
|
||||
NSMAN = new NetworkSyncManager( loading_window );
|
||||
MESSAGEMAN = new MessageManager;
|
||||
|
||||
Reference in New Issue
Block a user