mirror of
https://github.com/microsoft/terminal.git
synced 2026-02-05 05:37:12 +00:00
Fix showing a dialog multiple times (#12625)
After the dialog is displayed, always clear it out. If we don't, we won't be able to display another! * regressed in #12517. * [x] Fixes #12622.
This commit is contained in:
@@ -348,7 +348,11 @@ namespace winrt::TerminalApp::implementation
|
||||
}
|
||||
|
||||
_dialog = dialog;
|
||||
|
||||
// GH#12622: After the dialog is displayed, always clear it out. If we
|
||||
// don't, we won't be able to display another!
|
||||
const auto cleanup = wil::scope_exit([this]() {
|
||||
_dialog = nullptr;
|
||||
});
|
||||
// IMPORTANT: This is necessary as documented in the ContentDialog MSDN docs.
|
||||
// Since we're hosting the dialog in a Xaml island, we need to connect it to the
|
||||
// xaml tree somehow.
|
||||
|
||||
Reference in New Issue
Block a user