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