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()
|
public void SaveConfigSettings()
|
||||||
{
|
{
|
||||||
SaveColumnInfo();
|
SaveColumnInfo();
|
||||||
Settings.Wndx = Location.X;
|
|
||||||
Settings.Wndy = Location.Y;
|
if (WindowState == FormWindowState.Normal)
|
||||||
Settings.Width = Right - Left;
|
{
|
||||||
Settings.Height = Bottom - Top;
|
Settings.Wndx = Location.X;
|
||||||
|
Settings.Wndy = Location.Y;
|
||||||
|
Settings.Width = Right - Left;
|
||||||
|
Settings.Height = Bottom - Top;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadConfigSettings()
|
private void LoadConfigSettings()
|
||||||
|
|
|
@ -181,7 +181,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (!InitializeOnLoad())
|
if (!InitializeOnLoad())
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
DialogResult = DialogResult.Cancel;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -199,10 +199,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
form.FormClosing += (o, e) =>
|
form.FormClosing += (o, e) =>
|
||||||
{
|
{
|
||||||
settings.Wndx = form.Location.X;
|
if (form.WindowState == FormWindowState.Normal)
|
||||||
settings.Wndy = form.Location.Y;
|
{
|
||||||
settings.Width = form.Right - form.Left; // why not form.Size.Width?
|
settings.Wndx = form.Location.X;
|
||||||
settings.Height = form.Bottom - form.Top;
|
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) =>
|
dest[idx + 0].Click += (o, e) =>
|
||||||
|
|
|
@ -313,10 +313,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
SaveColumnInfo();
|
SaveColumnInfo();
|
||||||
|
|
||||||
Settings.Wndx = Location.X;
|
if (WindowState == FormWindowState.Normal)
|
||||||
Settings.Wndy = Location.Y;
|
{
|
||||||
Settings.Width = Right - Left;
|
Settings.Wndx = Location.X;
|
||||||
Settings.Height = Bottom - Top;
|
Settings.Wndy = Location.Y;
|
||||||
|
Settings.Width = Right - Left;
|
||||||
|
Settings.Height = Bottom - Top;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void NewSearch()
|
public void NewSearch()
|
||||||
|
|
|
@ -544,10 +544,14 @@ namespace BizHawk.Client.EmuHawk
|
||||||
private void SaveConfigSettings()
|
private void SaveConfigSettings()
|
||||||
{
|
{
|
||||||
SaveColumnInfo();
|
SaveColumnInfo();
|
||||||
Settings.Wndx = Location.X;
|
|
||||||
Settings.Wndy = Location.Y;
|
if (WindowState == FormWindowState.Normal)
|
||||||
Settings.Width = Right - Left;
|
{
|
||||||
Settings.Height = Bottom - Top;
|
Settings.Wndx = Location.X;
|
||||||
|
Settings.Wndy = Location.Y;
|
||||||
|
Settings.Width = Right - Left;
|
||||||
|
Settings.Height = Bottom - Top;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetMemoryDomain(string name)
|
private void SetMemoryDomain(string name)
|
||||||
|
|
Loading…
Reference in New Issue