Skip to content

Do not draw the selection over the frozen pane when it lies only in the scrolling pane (#198) - #217

Merged
h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
MarekSpodBiedry:issue-198
Oct 11, 2026
Merged

h-a-n-a-s-h-i merged 1 commit into
storytold:mainfrom
MarekSpodBiedry:issue-198

Conversation

@MarekSpodBiedry

Copy link
Copy Markdown
Contributor

Fixes #198.

With frozen rows or columns, all four panes are painted in one coordinate system and each pane only clips its own drawing. paint_selection ran once per pane and drew the whole selection every time, so a selection scrolled under the frozen columns/rows was painted on top of the frozen pane (the stray box in the issue screenshot).

What changed (crates/ui-egui/src/grid.rs, chartview.rs):

  • Selection (the reported bug): each pane now draws only the parts of the selection that lie in its own rows/columns: the fill, the active cell, the current-range border, the fill handle, the fill and move drag previews, the formula-reference colours and the copy marquee. A selection that crosses the freeze line is still drawn in both panes.
  • Pointer, same cause: the fill handle and the move border of a selection hidden under the frozen pane still reacted there (crosshair/move cursor, fill or move drag, double-click fill). They now react only in the panes where they are painted.
  • Other overlays with the same leak: the data-validation dropdown arrow (and its click), the validation input message, and note popups are no longer shown for a cell scrolled entirely under the frozen rows/columns; the range outline of Trace Precedents/Dependents and the source-range outline of a selected chart are clipped to the panes that hold the range.

New helpers on Geo: range_panes (screen areas of the panes that hold a range) and hidden_under_frozen (cell scrolled entirely under the frozen rows/columns). Sheets without frozen panes behave as before.

Not changed: charts, pictures and shapes still float over the frozen panes, and Trace Precedents/Dependents arrows are drawn across them, as before. How objects and arrows anchored across the freeze line should behave is a separate decision.

Tests: four unit tests in grid.rs (pane_tests) cover the pane overlap check, cells scrolled under the frozen columns, clipping ranges to their panes, and the hidden fill handle.

@echelon

echelon commented Oct 11, 2026

Copy link
Copy Markdown
Member

Merged — thank you for the contribution!

If you haven't already, come join us on the ArtCraft Discord: https://discord.gg/artcraft

h-a-n-a-s-h-i pushed a commit that referenced this pull request Oct 11, 2026
…pect frozen panes (#217) and right-to-left sheets (#310); es/de/cs strings for Animations

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
h-a-n-a-s-h-i pushed a commit that referenced this pull request Oct 11, 2026
), frozen-pane clipping (#217), right-to-left mirroring and freeze handles (#310, #309); es/de/cs strings for headers and footers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

[Bug] Highlighted Box overlays the frozen panel.

3 participants