Commit 068ee78
Fix dock icons disappearing on discard after size change (#47253)
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>1 parent 6f5ea3b commit 068ee78
2 files changed
Lines changed: 19 additions & 3 deletions
File tree
- src/modules/cmdpal
- Microsoft.CmdPal.UI.ViewModels/Dock
- Microsoft.CmdPal.UI/Dock
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
641 | | - | |
| 641 | + | |
| 642 | + | |
642 | 643 | | |
643 | 644 | | |
644 | 645 | | |
645 | 646 | | |
646 | | - | |
| 647 | + | |
647 | 648 | | |
648 | 649 | | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
649 | 653 | | |
650 | 654 | | |
651 | 655 | | |
| |||
658 | 662 | | |
659 | 663 | | |
660 | 664 | | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
661 | 670 | | |
662 | 671 | | |
663 | 672 | | |
664 | 673 | | |
| 674 | + | |
| 675 | + | |
665 | 676 | | |
666 | 677 | | |
667 | 678 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
265 | 270 | | |
266 | 271 | | |
267 | 272 | | |
| |||
0 commit comments