mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-10 00:48:23 -06:00
Revert lazy loading Quick Fix UI (#17552)
Turns out, when the branding disables the feature, we try to get `QuickFixMenu` when it's not loaded, causing a crash in TerminalPage. Since we end up loading the quick fix menu when we scroll or apply UI settings, we're actually loading the quick fix menu pretty early on. So might as well remove the `x:Load="False"`. If we feel strongly about keeping the lazy loading functionality, we can do that later (and probably apply the same heuristic to the other XAML we're registering in TerminalApp). This also adds a feature flag check when registering the menu in TerminalApp. Closes #17548
This commit is contained in:
parent
ac5b4f5831
commit
7d77160638
@ -1760,6 +1760,8 @@ namespace winrt::TerminalApp::implementation
|
||||
page->_PopulateContextMenu(weakTerm.get(), sender.try_as<MUX::Controls::CommandBarFlyout>(), true);
|
||||
}
|
||||
});
|
||||
if constexpr (Feature_QuickFix::IsEnabled())
|
||||
{
|
||||
term.QuickFixMenu().Opening([weak = get_weak(), weakTerm](auto&& sender, auto&& /*args*/) {
|
||||
if (const auto& page{ weak.get() })
|
||||
{
|
||||
@ -1767,6 +1769,7 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Method Description:
|
||||
// - Connects event handlers to the TerminalTab for events that we want to
|
||||
|
||||
@ -1286,7 +1286,6 @@
|
||||
Padding="0"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
x:Load="False"
|
||||
AllowFocusOnInteraction="False"
|
||||
CornerRadius="0,5,5,0"
|
||||
PointerEntered="_QuickFixButton_PointerEntered"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user