forked from microsoft/terminal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix refresh-related crashes in Settings UI (microsoft#8773)
Removes the visibility hack in `UpdateSettings` where we were hiding Profile menu items instead of removing them. This hack was removed using `ReplaceAll`. For an unknown reason, calling `Remove()` would result in an out-of-bounds error in XAML code. The "Discard" button would improperly refresh the Settings UI. Both of the bugs were caused by holding a reference to a hidden menu item then trying to set the `SelectedItem` to that menu item. Additionally, 9283375 adds a check for the selected item in `SettingsNav_ItemInvoked()`. This prevents navigation to an already selected item. This was the heuristic used by the XAML Controls Gallery. References microsoft#6800 - Settings UI Epic ## Validation Steps Performed (Repeated for each menu item) 1. Select the menu item 2. click "Discard changes" 3. Verify navigated to same page Also performed repro steps for microsoft#8747 and microsoft#8748. Closes microsoft#8747 Closes microsoft#8748
- Loading branch information
1 parent
c33a979
commit 9fed14a
Showing
2 changed files
with
68 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters