fix exit to project selection in map selection

This commit is contained in:
T1ti
2024-05-07 21:47:38 +02:00
parent 3d0e3471f4
commit 11fdd9660c
2 changed files with 9 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ namespace Noggit::Application {
}
BlizzardArchive::ClientData* clientData() { return _client_data.get(); }
bool hasClientData() { return _client_data != nullptr; }
bool hasClientData() const { return _client_data != nullptr; }
void setClientData(std::shared_ptr<BlizzardArchive::ClientData> data) { _client_data = data; }
void initalize(int argc, char* argv[], std::vector<bool> Parser);

View File

@@ -481,6 +481,13 @@ namespace Noggit::Ui::Windows
promptExit(event);
} else
{
if (exit_to_project_selection)
{
auto noggit = Noggit::Application::NoggitApplication::instance();
auto project_selection = new Noggit::Ui::Windows::NoggitProjectSelectionWindow(noggit);
project_selection->show();
}
else
event->accept();
}
exit_to_project_selection = false;