bdc1be25aff5b9c828617e14d247ef81e7a0fecb
A selected construction site rebuilt the entire panel on every TickAdvancedEvent (~30x/s at 1x), because refreshSelectionDisplay() called rebuild() for sites. Each rebuild runs buildSingle() -> hideAllWidgets(), which hides and re-shows the recipe-select button. Hiding a QPushButton mid-press clears its pressed state, so a rebuild landing between the user's mouse press and release cancelled the click. While paused no tick advances, so no rebuild occurred and the button worked -- matching the report. Give sites a lightweight per-tick refresh that updates only the progress label, mirroring refreshBuffers() for live buildings. The site progress block is extracted from buildSingle() into refreshSiteProgress() (no duplicated arithmetic). refreshSelectionDisplay() now takes a RefreshReason: a PeriodicTick updates progress only, while a CommandApplied still rebuilds so a site's newly chosen recipe/layout is reflected. The site -> completed building transition remains handled by the existing "(Building) " title branch. No UI test added: the test target links only lib (no QtWidgets), per the simulation/presentation split, so a widget-level test does not fit the harness. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DyCu8vwChKMbLJQ3xosYEN
Description
No description provided
Languages
C++
96%
CMake
2.2%
Python
1.2%
C
0.6%