Skip to content

Fixes #4854. Adornment SubView LineCanvas auto-join pipeline fix#4855

Closed
tig wants to merge 2 commits intogui-cs:v2_developfrom
tig:fix/4854-adornment-linecanvas-autojoin
Closed

Fixes #4854. Adornment SubView LineCanvas auto-join pipeline fix#4855
tig wants to merge 2 commits intogui-cs:v2_developfrom
tig:fix/4854-adornment-linecanvas-autojoin

Conversation

@tig
Copy link
Copy Markdown
Member

@tig tig commented Mar 25, 2026

Fix will be in :

Problem

Adornment SubViews with SuperViewRendersLineCanvas = true can't get their LineCanvas lines auto-joined with the parent View's border. Lines are merged but never rendered.

Root Cause (two bugs)

  1. ClearNeedsDraw() clears AdornmentView LC prematurely: After borderView.Draw(), ClearNeedsDraw() calls LineCanvas.Clear() — wiping merged SubView lines before DoDrawAdornmentsSubViews can consume them.

  2. LineCanvas.Exclude() blocks merged lines: The Exclude for SVRLC SubViews prevents their merged lines from appearing in GetCellMap.

Fix

Three changes in View.Drawing.cs and View.NeedsDraw.cs:

  1. Pipeline reorder: DoDrawAdornmentsSubViews before DoRenderLineCanvas so merged lines are present when LC renders.
  2. Skip Exclude for SVRLC SubViews: Their LC lines fill those positions via Merge.
  3. Don't clear AdornmentView LC in ClearNeedsDraw: Preserve merged lines for the parent's merge.

Tests

  • BorderSubView_Lines_Not_Rendered — minimal repro: 7×3 View, top-only border, SubView adds double-line via SVRLC. Verifies ──═══── renders correctly.

Verification

All 15,162 tests pass on the tabview branch where the full pipeline is exercised.

Note: This fix has 3 Dialog test regressions when applied to bare v2_develop (the pipeline reorder changes draw order for Dialog buttons). These are resolved when combined with the tabview branch changes. Merging this after #4829 is recommended.

tig and others added 2 commits March 25, 2026 09:10
…-cs#4854)

Add AdornmentSubViewLineCanvasTests with two Skip'd tests that demonstrate
the bug: DoDrawAdornmentsSubViews runs AFTER DoRenderLineCanvas, so
adornment SubView border lines merged via LineCanvas.Merge arrive too
late for auto-join with the parent's border.

Tests cover Border and Padding SubViews with SuperViewRendersLineCanvas.
Both verify that junction glyphs (┴) should appear where SubView borders
meet parent borders — currently they don't.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Three changes to enable adornment SubView border lines (via
SuperViewRendersLineCanvas) to auto-join with the parent View's border:

1. Reorder draw pipeline: DoDrawAdornmentsSubViews now runs BEFORE
   DoRenderLineCanvas so merged lines are present when the LineCanvas
   renders.

2. Skip Exclude for SuperViewRendersLineCanvas SubViews: These SubViews
   contribute LC lines via Merge that should fill their positions, not
   be excluded from rendering.

3. Don't clear AdornmentView LineCanvas in ClearNeedsDraw: AdornmentView
   LC may hold merged SubView lines that haven't been consumed by the
   parent's DoDrawAdornmentsSubViews yet. Those lines are cleared after
   merging into the parent's LC.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.

1 participant