Skip to content

Commit

Permalink
Stop splitters from migrating between sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Dec 3, 2018
1 parent 7413c23 commit abe887e
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions GUI/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,18 @@ protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
protected override void OnShown(EventArgs e)
{
actuallyVisible = true;

try
{
splitContainer1.SplitterDistance = configuration.PanelPosition;
}
catch
{
// SplitContainer is mis-designed to throw exceptions
// if the min/max limits are exceeded rather than simply obeying them.
}
ModInfoTabControl.ModMetaSplitPosition = configuration.ModInfoPosition;

base.OnShown(e);
}

Expand All @@ -320,16 +332,6 @@ protected override void OnLoad(EventArgs e)
Location = configuration.WindowLoc;
Size = configuration.WindowSize;
WindowState = configuration.IsWindowMaximised ? FormWindowState.Maximized : FormWindowState.Normal;
try
{
splitContainer1.SplitterDistance = configuration.PanelPosition;
}
catch
{
// SplitContainer is mis-designed to throw exceptions
// if the min/max limits are exceeded rather than simply obeying them.
}
ModInfoTabControl.ModMetaSplitPosition = configuration.ModInfoPosition;

if (!configuration.CheckForUpdatesOnLaunchNoNag && AutoUpdate.CanUpdate)
{
Expand Down

0 comments on commit abe887e

Please sign in to comment.