Skip to content

Commit 7cb0c25

Browse files
authored
Merge pull request #1474 from OutpostUniverse/Fix/Police-Overlay-On-Load-From-Main-Menu
Fix/police overlay on load from main menu
2 parents e94a693 + fd50657 commit 7cb0c25

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

OPHD/States/MapViewState.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ MapViewState::MapViewState(MainReportsUiState& mainReportsState, const Planet::A
204204
mRobots{"ui/robots.png", 46, constants::MarginTight},
205205
mConnections{"ui/structures.png", 46, constants::MarginTight},
206206
mPopulationPanel{mPopulation, mPopulationPool, mMorale},
207+
mPoliceOverlays(static_cast<std::vector<Tile*>::size_type>(mTileMap->maxDepth())),
207208
mResourceInfoBar{mResourcesCount, mPopulation, mMorale, mFood},
208209
mRobotDeploymentSummary{mRobotPool},
209210
mMiniMap{std::make_unique<MiniMap>(*mMapView, *mTileMap, mRobotList, planetAttributes.mapImagePath)},
@@ -270,7 +271,6 @@ void MapViewState::initialize()
270271
mResourceInfoBar.ignoreGlow(mTurnCount == 0);
271272

272273
setupUiPositions(renderer.size());
273-
resetPoliceOverlays();
274274

275275
mMainReportsState.injectTechnology(mTechnologyReader, mResearchTracker);
276276

OPHD/States/MapViewStateIO.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ void MapViewState::load(const std::string& filePath)
218218
{
219219
resetUi();
220220

221+
mBtnToggleConnectedness.toggle(false);
222+
mBtnToggleCommRangeOverlay.toggle(false);
223+
mBtnToggleRouteOverlay.toggle(false);
224+
mBtnTogglePoliceOverlay.toggle(false);
225+
221226
auto& renderer = NAS2D::Utility<NAS2D::Renderer>::get();
222227
renderer.drawBoxFilled(NAS2D::Rectangle{{0, 0}, renderer.size()}, NAS2D::Color{0, 0, 0, 100});
223228
const auto imageLoading = &imageCache.load("sys/loading.png");

0 commit comments

Comments
 (0)