forked from speed-dreams/speed-dreams-code
Reload GfRaceManagers on downloadsmenu exit
This is required since _vecAcceptedCarCategoryIds must be reloaded so that car categories are refreshed when entering the driver selection menu.
This commit is contained in:
parent
a0c2dcc761
commit
9a21275afc
3 changed files with 9 additions and 0 deletions
|
@ -62,6 +62,12 @@ void GfRaceManagers::shutdown()
|
|||
_pSelf = 0;
|
||||
}
|
||||
|
||||
void GfRaceManagers::reload()
|
||||
{
|
||||
shutdown();
|
||||
_pSelf = new GfRaceManagers;
|
||||
}
|
||||
|
||||
GfRaceManagers::~GfRaceManagers()
|
||||
{
|
||||
std::vector<GfRaceManager*>::const_iterator itRaceMan;
|
||||
|
|
|
@ -112,6 +112,7 @@ public:
|
|||
// Accessor to the unique instance of the singleton.
|
||||
static GfRaceManagers* self();
|
||||
static void shutdown();
|
||||
static void reload();
|
||||
|
||||
const std::vector<std::string>& getTypes() const;
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <portability.h>
|
||||
#include <cars.h>
|
||||
#include <tracks.h>
|
||||
#include <racemanagers.h>
|
||||
#include <drivers.h>
|
||||
#include "assets.h"
|
||||
#include "downloadsmenu.h"
|
||||
|
@ -1050,6 +1051,7 @@ DownloadsMenu::~DownloadsMenu()
|
|||
curl_multi_cleanup(multi);
|
||||
GfCars::reload();
|
||||
GfTracks::reload();
|
||||
GfRaceManagers::reload();
|
||||
GfDrivers::self()->reload();
|
||||
GfuiScreenRelease(hscr);
|
||||
GfuiScreenActivate(prev);
|
||||
|
|
Loading…
Reference in a new issue