Jonas Reith 7cc44cda84 Fix Territory/Culture/Wealth view toggles reverting instantly + orphaned overlay lines
Two independent bugs, both found by reading the raygui source rather than
relying on live clicks:

1. The toolbar's view-mode dropdown re-applied its (stale) selected index back
   onto Viewer::mode every single frame whenever mode was Territory/Culture/
   Wealth/Ecoregion/Habitability -- none of which are in the dropdown's plain
   13-entry list, so this fired unconditionally and reverted the view within
   the same frame it was toggled on, regardless of pause state. Fixed by only
   applying a mode change when the dropdown's active index actually changed
   as a result of that frame's GuiDropdownBox call (verified against raygui's
   own source: it only writes back *active on a genuine item click).

2. showNationBorders/showCultureBorders/showTradeRoutes were separate bools
   set true only inside their own P/X/Z toggle method, with nothing resetting
   them when the user switched views by any other means (number keys, the
   dropdown, another civ toggle) -- so realm borders, war fronts, alliance
   arcs and trade routes, once ever turned on, kept drawing over every other
   view forever. Fixed by deriving all three from `mode` instead of storing
   them separately, removing the possibility of drift entirely.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TMfyZv91tonDnPJqbaTVJE
2026-08-30 18:28:21 +02:00
Description
No description provided
5.5 MiB
Languages
C++ 99.6%
CMake 0.4%