Fix ShowWindow to use owner in non-modal, if available

This commit is contained in:
Martin Smith 2025-05-14 10:44:48 +01:00
parent a8bf955fff
commit 86f8341f3b

View file

@ -109,8 +109,13 @@ namespace SourceGit
{ {
if (data is Views.ChromelessWindow window) if (data is Views.ChromelessWindow window)
{ {
if (showAsDialog && Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner }) if (Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner })
window.ShowDialog(owner); {
if (showAsDialog)
window.ShowDialog(owner);
else
window.Show(owner);
}
else else
window.Show(); window.Show();