mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 11:19:51 +02:00
Prevent saves from being loaded twice by the Save browser
This commit is contained in:
@@ -40,6 +40,7 @@ public:
|
||||
try
|
||||
{
|
||||
cc->gameModel->SetSave(cc->search->GetLoadedSave());
|
||||
cc->search->ReleaseLoadedSave();
|
||||
}
|
||||
catch(GameModelException & ex)
|
||||
{
|
||||
|
@@ -55,6 +55,11 @@ SaveInfo * SearchController::GetLoadedSave()
|
||||
return searchModel->GetLoadedSave();
|
||||
}
|
||||
|
||||
void SearchController::ReleaseLoadedSave()
|
||||
{
|
||||
searchModel->SetLoadedSave(NULL);
|
||||
}
|
||||
|
||||
void SearchController::Update()
|
||||
{
|
||||
if(!nextQueryDone && nextQueryTime < clock())
|
||||
|
@@ -44,6 +44,7 @@ public:
|
||||
void RemoveSelected();
|
||||
void UnpublishSelected();
|
||||
void FavouriteSelected();
|
||||
void ReleaseLoadedSave();
|
||||
SaveInfo * GetLoadedSave();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user