diff --git a/CHANGELOG.md b/CHANGELOG.md index ef27cd041b..da7841b601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,13 @@ All notable changes to this project will be documented in this file. ## v1.25.1 ### Features -- [GUI] Replace empty max KSP version string with "any" #2420 +- [GUI] Replace empty max KSP version string with "any" (#2420 by: DasSkellet; reviewed: HebaruSan, politas) ### Bugfixes - [GUI] Splitter and tabstrip visual improvements (#2413 by: HebaruSan; reviewed: politas) - [GUI] Fix "Collection was modified" exception for redundant optional dependencies (#2423 by: HebaruSan; reviewed: politas) - [core] Treat installed DLC as compatible dependency (#2424 by: HebaruSan; reviewed: politas) +- [GUI] Ignore splitter exceptions (#2426 by: HebaruSan; reviewed: politas) ### Internal diff --git a/GUI/Main.cs b/GUI/Main.cs index b2858176bf..5835a019a3 100644 --- a/GUI/Main.cs +++ b/GUI/Main.cs @@ -280,7 +280,15 @@ protected override void OnLoad(EventArgs e) Location = configuration.WindowLoc; Size = configuration.WindowSize; WindowState = configuration.IsWindowMaximised ? FormWindowState.Maximized : FormWindowState.Normal; - splitContainer1.SplitterDistance = configuration.PanelPosition; + 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) diff --git a/GUI/MainModInfo.Designer.cs b/GUI/MainModInfo.Designer.cs index be29518d4f..d49c4e6eee 100644 --- a/GUI/MainModInfo.Designer.cs +++ b/GUI/MainModInfo.Designer.cs @@ -109,12 +109,12 @@ private void InitializeComponent() // splitContainer2.Panel1 // this.splitContainer2.Panel1.Controls.Add(this.MetaDataUpperLayoutPanel); - this.splitContainer2.Panel1MinSize = 100; + this.splitContainer2.Panel1MinSize = 75; // // splitContainer2.Panel2 // this.splitContainer2.Panel2.Controls.Add(this.MetaDataLowerLayoutPanel); - this.splitContainer2.Panel2MinSize = 300; + this.splitContainer2.Panel2MinSize = 225; this.splitContainer2.Size = new System.Drawing.Size(348, 496); this.splitContainer2.SplitterWidth = 10; this.splitContainer2.SplitterDistance = 235; diff --git a/GUI/MainModInfo.cs b/GUI/MainModInfo.cs index b10d8ceaa0..a70c84ed0d 100644 --- a/GUI/MainModInfo.cs +++ b/GUI/MainModInfo.cs @@ -69,7 +69,15 @@ public int ModMetaSplitPosition } set { - this.splitContainer2.SplitterDistance = value; + try + { + this.splitContainer2.SplitterDistance = value; + } + catch + { + // SplitContainer is mis-designed to throw exceptions + // if the min/max limits are exceeded rather than simply obeying them. + } } }