Skip to content

Commit 5cac79b

Browse files
committed
Gui: set the owner to keep order between windows
1 parent 332fe22 commit 5cac79b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

OKEGui/OKEGui/Gui/MainWindow.xaml.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ private void BtnNew_Click(object sender, RoutedEventArgs e)
136136
// 新建任务。具体实现请见Gui/wizardWindow
137137
try
138138
{
139-
var wizard = new WizardWindow(wm);
139+
var wizard = new WizardWindow(wm)
140+
{
141+
Owner = this
142+
};
140143
wizard.ShowDialog();
141144
UpdateActiveRelatedButtons();
142145
UpdateCountRelatedButtons();
@@ -427,7 +430,10 @@ private void BtnCancelShutdown_Click(object sender, RoutedEventArgs e)
427430

428431
private void BtnConfig_Click(object sender, RoutedEventArgs e)
429432
{
430-
Window config = new ConfigPanel();
433+
Window config = new ConfigPanel
434+
{
435+
Owner = this
436+
};
431437
config.ShowDialog();
432438
}
433439

0 commit comments

Comments
 (0)