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:
adelikat 2015-09-05 17:05:14 -04:00
parent 08978978d0
commit 6d4dea9a14
5 changed files with 31 additions and 17 deletions

View File

@ -186,11 +186,15 @@ namespace BizHawk.Client.EmuHawk
public void SaveConfigSettings()
{
SaveColumnInfo();
if (WindowState == FormWindowState.Normal)
{
Settings.Wndx = Location.X;
Settings.Wndy = Location.Y;
Settings.Width = Right - Left;
Settings.Height = Bottom - Top;
}
}
private void LoadConfigSettings()
{

View File

@ -181,7 +181,7 @@ namespace BizHawk.Client.EmuHawk
if (!InitializeOnLoad())
{
Close();
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
DialogResult = DialogResult.Cancel;
return;
}

View File

@ -198,11 +198,14 @@ namespace BizHawk.Client.EmuHawk
}
form.FormClosing += (o, e) =>
{
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) =>

View File

@ -313,11 +313,14 @@ namespace BizHawk.Client.EmuHawk
{
SaveColumnInfo();
if (WindowState == FormWindowState.Normal)
{
Settings.Wndx = Location.X;
Settings.Wndy = Location.Y;
Settings.Width = Right - Left;
Settings.Height = Bottom - Top;
}
}
public void NewSearch()
{

View File

@ -544,11 +544,15 @@ namespace BizHawk.Client.EmuHawk
private void SaveConfigSettings()
{
SaveColumnInfo();
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)
{