-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix reordering tabs mysteriously shuffling the actual backing tabs #15178
Fix reordering tabs mysteriously shuffling the actual backing tabs #15178
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As long as this works. Are we sure that this works? I'm mildly horrified that we get the event after it's rearranged our backing store, but.. whatever man
@@ -4739,8 +4740,8 @@ namespace winrt::TerminalApp::implementation | |||
} | |||
} | |||
|
|||
// `this` is safe to use | |||
const auto request = winrt::make_self<RequestReceiveContentArgs>(src, _WindowProperties.WindowId(), index); | |||
const auto myId{ _WindowProperties.WindowId() }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated, but i don't mind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works on my machine™
Thanks :^)
Reverts #15164, because that's fixed upstream now. Closes #15139. Reverts #15178, but also closes #15121, because that's fixed upstream. see also: * microsoft/microsoft-ui-xaml#8430 * microsoft/microsoft-ui-xaml#8420
TL;DR: we stopped getting
TabView.TabItemsChanged
. This meant that the tab view would change its apparent order, but we wouldn't change the backing tab order.I'm fixing this by grabbing the index of the tab that starts the drag, and the index of the tab view item at the end of the drag, and using that to reorder our backing list.
Closes #15121
Upstream microsoft/microsoft-ui-xaml#8388
Regressed in #15078 - I'm pretty confident about this, since I've got a 1.18.931 build of the Terminal with tear-out, but not MUX 2.8.