Skip to content

Fix AxisChange/Invalidate call order in ZedGraph controls#3737

Merged
meee1 merged 4 commits into
masterfrom
copilot/bugfix-graph-telemetry-logs
Jun 12, 2026
Merged

Fix AxisChange/Invalidate call order in ZedGraph controls#3737
meee1 merged 4 commits into
masterfrom
copilot/bugfix-graph-telemetry-logs

Conversation

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

zg.Invalidate() was being called before zg.AxisChange() in multiple places, meaning the control redraws with a stale axis scale. This was most visible when unchecking a curve in the telemetry log graph — the remaining curves' Y-axis scale would not update.

The correct order is always AxisChange() then Invalidate().

Changes

  • Log/MavlinkLog.cs — 3 locations fixed:
    • treeView1_NodeMouseClick: added missing AxisChange() before Invalidate() (only Invalidate() was present)
    • Two locations in chk_box_CheckedChanged: swapped reversed call order
  • Controls/fftui.cs — 5 locations fixed: all had Invalidate() before AxisChange()
// Before (wrong — redraws before axis scale is recalculated)
zg1.Invalidate();
zg1.AxisChange();

// After (correct)
zg1.AxisChange();
zg1.Invalidate();

Copilot AI changed the title [WIP] Fix overlapping graphs in telemetry logs for custom fields Fix graph axis not rescaling after removing curves in telemetry log viewer Jun 12, 2026
Copilot finished work on behalf of meee1 June 12, 2026 21:27
Copilot AI requested a review from meee1 June 12, 2026 21:27
Copilot AI changed the title Fix graph axis not rescaling after removing curves in telemetry log viewer Fix AxisChange/Invalidate call order in ZedGraph controls Jun 12, 2026
Copilot finished work on behalf of meee1 June 12, 2026 21:47
@meee1 meee1 marked this pull request as ready for review June 12, 2026 22:01
@meee1 meee1 merged commit 4576278 into master Jun 12, 2026
10 of 11 checks passed
@meee1 meee1 deleted the copilot/bugfix-graph-telemetry-logs branch June 12, 2026 22:28
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.

2 participants