Skip to content

Analysis: remember collapse per Roll/Frame tab, keep its height across restarts - #1374

Merged
marcinz606 merged 2 commits into
mainfrom
mz/analysis-collapse-per-tab
Oct 12, 2026
Merged

marcinz606 merged 2 commits into
mainfrom
mz/analysis-collapse-per-tab

Conversation

@marcinz606

Copy link
Copy Markdown
Owner

Summary

  • The Roll and Frame tabs each remember whether Analysis is collapsed. Frame uses the existing section_expanded_analysis setting. Roll uses a new section_expanded_analysis_roll setting. Switching tabs restores the state of the new tab.
  • make_section has a new keyword-only persist=False option. With it, a caller can own the expanded state and keep the help dialog's saved size.
  • Fix: the Analysis height was not kept across restarts. The split was set before the window showed, when the splitter has no real height, so Qt rescaled it (saved [500, 409] came back as [275, 634]). The split is now applied once, after the first show. The expanded height comes from the saved setting and from drags while Analysis is expanded.

Refs #1370

Test plan

  • make all
  • New unit tests in tests/test_right_panel_wiring.py: each tab restores its own state; a drag while collapsed does not change the saved height; no resize before the first show
  • Headless run of the real app (xvfb): collapse on Roll, expand on Frame, switch back and forth, restart on each tab. Both states and the dragged height are kept.

Analysis is pinned above both Roll and Frame, but shared one expanded
state, so collapsing it on Roll also collapsed it on Frame. Each tab
now keeps its own: Frame stays on section_expanded_analysis, Roll uses
section_expanded_analysis_roll, and switching tabs restores it.

make_section gains persist=False so a caller can own the expanded
state without losing the help dialog's saved geometry.
The splitter split was set before the window was shown, when the
splitter has no real height, so Qt rescaled it: a saved [500, 409]
came back as [275, 634]. Starting collapsed and then expanding at
startup locked in the rescaled height.

The split is now applied once, after the first show, and before that
no resize happens. The expanded height comes from the saved setting
and from drags while Analysis is expanded. A drag of the collapsed
header no longer overwrites it.
@marcinz606
marcinz606 merged commit 1269438 into main Oct 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant