Don't attempt to remember tool window size/position if tool is minimized/maximized, this fixes issue #491 but also fixes the bug in every tool (unless there is a tool that does not implement IAutoToolFormConfig that I missed in this changeset)
This commit is contained in:
parent
08978978d0
commit
6d4dea9a14
|
@ -186,10 +186,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
public void SaveConfigSettings()
|
||||
{
|
||||
SaveColumnInfo();
|
||||
Settings.Wndx = Location.X;
|
||||
Settings.Wndy = Location.Y;
|
||||
Settings.Width = Right - Left;
|
||||
Settings.Height = Bottom - Top;
|
||||
|
||||
if (WindowState == FormWindowState.Normal)
|
||||
{
|
||||
Settings.Wndx = Location.X;
|
||||
Settings.Wndy = Location.Y;
|
||||
Settings.Width = Right - Left;
|
||||
Settings.Height = Bottom - Top;
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadConfigSettings()
|
||||
|
|
|
@ -181,7 +181,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (!InitializeOnLoad())
|
||||
{
|
||||
Close();
|
||||
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
DialogResult = DialogResult.Cancel;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -199,10 +199,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
form.FormClosing += (o, e) =>
|
||||
{
|
||||
settings.Wndx = form.Location.X;
|
||||
settings.Wndy = form.Location.Y;
|
||||
settings.Width = form.Right - form.Left; // why not form.Size.Width?
|
||||
settings.Height = form.Bottom - form.Top;
|
||||
if (form.WindowState == FormWindowState.Normal)
|
||||
{
|
||||
settings.Wndx = form.Location.X;
|
||||
settings.Wndy = form.Location.Y;
|
||||
settings.Width = form.Right - form.Left; // why not form.Size.Width?
|
||||
settings.Height = form.Bottom - form.Top;
|
||||
}
|
||||
};
|
||||
|
||||
dest[idx + 0].Click += (o, e) =>
|
||||
|
|
|
@ -313,10 +313,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
SaveColumnInfo();
|
||||
|
||||
Settings.Wndx = Location.X;
|
||||
Settings.Wndy = Location.Y;
|
||||
Settings.Width = Right - Left;
|
||||
Settings.Height = Bottom - Top;
|
||||
if (WindowState == FormWindowState.Normal)
|
||||
{
|
||||
Settings.Wndx = Location.X;
|
||||
Settings.Wndy = Location.Y;
|
||||
Settings.Width = Right - Left;
|
||||
Settings.Height = Bottom - Top;
|
||||
}
|
||||
}
|
||||
|
||||
public void NewSearch()
|
||||
|
|
|
@ -544,10 +544,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
private void SaveConfigSettings()
|
||||
{
|
||||
SaveColumnInfo();
|
||||
Settings.Wndx = Location.X;
|
||||
Settings.Wndy = Location.Y;
|
||||
Settings.Width = Right - Left;
|
||||
Settings.Height = Bottom - Top;
|
||||
|
||||
if (WindowState == FormWindowState.Normal)
|
||||
{
|
||||
Settings.Wndx = Location.X;
|
||||
Settings.Wndy = Location.Y;
|
||||
Settings.Width = Right - Left;
|
||||
Settings.Height = Bottom - Top;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetMemoryDomain(string name)
|
||||
|
|
Loading…
Reference in New Issue