[PR #15162] [MERGED] fix not updating the nav view when add/removing profiles #30459

Open
opened 2026-01-31 09:40:57 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/15162
Author: @zadjii-msft
Created: 4/11/2023
Status: ✅ Merged
Merged: 4/17/2023
Merged by: @zadjii-msft

Base: main ← Head: dev/migire/b/15140-settings-add-remove


📝 Commits (10+)

  • 1ecbc18 fix not updating the nav view when add/removing profiles
  • a28a6aa add guards to menuitemsource.try_as
  • eb8c196 Merge branch 'main' into dev/migire/b/15140-settings-add-remove
  • 66520dd WHAT THE HECK IS GOING ON
  • 1720e85 yep this works
  • e8c0224 cleanup
  • ab4ba7c a bit of dead code
  • b8b61bd Merge branch 'main' into dev/migire/b/15140-settings-add-remove
  • 6d8c1b0 Merge remote-tracking branch 'origin/main' into dev/migire/b/15140-settings-add-remove
  • 249ccb0 cleanup

📊 Changes

2 files changed (+50 additions, -74 deletions)

View changed files

📝 src/cascadia/TerminalSettingsEditor/MainPage.cpp (+47 -74)
📝 src/cascadia/TerminalSettingsEditor/MainPage.h (+3 -0)

📄 Description

  • make the list of MenuItems observable, so the nav view can actually listen for changes to it
  • Use the MenuItemsSource to find the index to add at, rather than the MenuItems (which isn't accurate anymore)
  • Stash a single observable vector as the menuitemsource, and modify that whenever we need to do modifications.
    • I attempted to create a new vector, then copy into the new one, then replace the MenuItemsSource with the new vector, but that refused to work. So let's just... not.

Regressed in #14630
Closes #15140

Manually validated that this and #13673 are still fixed


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/15162 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 4/11/2023 **Status:** ✅ Merged **Merged:** 4/17/2023 **Merged by:** [@zadjii-msft](https://github.com/zadjii-msft) **Base:** `main` ← **Head:** `dev/migire/b/15140-settings-add-remove` --- ### 📝 Commits (10+) - [`1ecbc18`](https://github.com/microsoft/terminal/commit/1ecbc1884c787a245e68d43c583cfadbab2e5ac1) fix not updating the nav view when add/removing profiles - [`a28a6aa`](https://github.com/microsoft/terminal/commit/a28a6aa811a69cbb96996ecb62f778aeb8637521) add guards to menuitemsource.try_as - [`eb8c196`](https://github.com/microsoft/terminal/commit/eb8c19602cc1c0f9e5e11bf39653fa4caed974b0) Merge branch 'main' into dev/migire/b/15140-settings-add-remove - [`66520dd`](https://github.com/microsoft/terminal/commit/66520ddeca910b759ba07b1be442fa132c4ac627) WHAT THE HECK IS GOING ON - [`1720e85`](https://github.com/microsoft/terminal/commit/1720e854b3d35ebfff0727f9ed81351b4b899313) yep this works - [`e8c0224`](https://github.com/microsoft/terminal/commit/e8c02249215a9f57a15496350a4d7cfbb1b2615d) cleanup - [`ab4ba7c`](https://github.com/microsoft/terminal/commit/ab4ba7ca21e9e6aec59654b9c44557616a7abd85) a bit of dead code - [`b8b61bd`](https://github.com/microsoft/terminal/commit/b8b61bd071f4004b8ede49b75149557cd584fbd3) Merge branch 'main' into dev/migire/b/15140-settings-add-remove - [`6d8c1b0`](https://github.com/microsoft/terminal/commit/6d8c1b0a05d1246efc6044d8a9a8807c50b90a06) Merge remote-tracking branch 'origin/main' into dev/migire/b/15140-settings-add-remove - [`249ccb0`](https://github.com/microsoft/terminal/commit/249ccb0b69db39734298a20ab8b370a94099a9cc) cleanup ### 📊 Changes **2 files changed** (+50 additions, -74 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsEditor/MainPage.cpp` (+47 -74) 📝 `src/cascadia/TerminalSettingsEditor/MainPage.h` (+3 -0) </details> ### 📄 Description * make the list of MenuItems observable, so the nav view can actually listen for changes to it * Use the MenuItemsSource to find the index to add at, rather than the MenuItems (which isn't accurate anymore) * Stash a single observable vector as the menuitemsource, and modify that whenever we need to do modifications. * I attempted to create a new vector, then copy into the new one, then replace the MenuItemsSource with the new vector, but that _refused_ to work. So let's just... not. Regressed in #14630 Closes #15140 Manually validated that this and #13673 are still fixed --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:40:57 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30459