Skip to content

Fix dock icons disappearing on discard after size change (#47253)#48139

Draft
michaeljolley wants to merge 1 commit into
mainfrom
dev/mjolley/fix-dock-icons-disappear-on-discard
Draft

Fix dock icons disappearing on discard after size change (#47253)#48139
michaeljolley wants to merge 1 commit into
mainfrom
dev/mjolley/fix-dock-icons-disappear-on-discard

Conversation

@michaeljolley

Copy link
Copy Markdown
Contributor

Summary

Fixes #47253

Root Cause

When dock size is changed in CmdPal settings while the dock is in edit mode, DockControl.DockSize DP is updated but ViewModel.UpdateSettings() is blocked by _isEditing. On discard, RestoreBandOrder() restored the ViewModel settings but never synced DockControl.DockSize back, leaving the view in an inconsistent state.

Fix

  • RestoreBandOrder() now returns restored DockSettings and persists them to the service (while _isEditing is true to prevent redundant SetupBands).
  • DiscardEditMode() calls UpdateSettings() on DockControl with restored settings to sync DockSize/Side.

When dock size is changed in settings while in edit mode and then
discarded, the DockControl.DockSize DP was never restored to the
pre-edit value. This caused a state mismatch where the view rendered
at the wrong size while the ViewModel held the original settings.

Fix: RestoreBandOrder() now persists the snapshot settings back to
the service (while _isEditing is still true to prevent redundant
rebuilds) and returns the restored DockSettings. DiscardEditMode()
uses those settings to immediately sync the DockControl's DockSize
and related properties.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@michaeljolley michaeljolley added the Product-Command Palette Refers to the Command Palette utility label May 26, 2026
@michaeljolley michaeljolley self-assigned this May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dock: switching between Compact and Default while it is being edited and discards changes makes the icons disappear

1 participant