game: ensure the palette dialog is hidden when no flag is under construction

This commit is contained in:
Crypto City 2021-11-27 11:10:02 +00:00
parent b7cbde7ee3
commit 19abdcce80

View File

@ -841,6 +841,11 @@ void UIUrho3D::UpdateBuildOverview(const boost::optional<std::tuple<uint32_t, st
if (!flagUnderConstruction)
{
buildOverviewWidget->SetVisibility(WIDGET_VISIBILITY_INVISIBLE);
if (paletteDialog)
{
paletteDialog->Close();
paletteDialog = NULL;
}
return;
}
const std::shared_ptr<Flag> flag = gameState->map.get_flag(std::get<0>(*flagUnderConstruction));