Skip to content

Commit 6cc3a62

Browse files
committed
Fixed window "disappearing"
The window would be "invisible" after a restart if you closed Pale while the window was minimized.
1 parent bc0fa29 commit 6cc3a62

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

MabiPale2/FrmAbout.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

MabiPale2/FrmMain.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,14 @@ private void FrmMain_Load(object sender, EventArgs e)
7575

7676
private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
7777
{
78-
Settings.Default.X = Left;
79-
Settings.Default.Y = Top;
80-
Settings.Default.Width = Width;
81-
Settings.Default.Height = Height;
82-
Settings.Default.Maximized = (WindowState == FormWindowState.Maximized);
78+
if (WindowState != FormWindowState.Minimized)
79+
{
80+
Settings.Default.X = Left;
81+
Settings.Default.Y = Top;
82+
Settings.Default.Width = Width;
83+
Settings.Default.Height = Height;
84+
Settings.Default.Maximized = (WindowState == FormWindowState.Maximized);
85+
}
8386
Settings.Default.Save();
8487

8588
Disconnect();

0 commit comments

Comments
 (0)