Skip to content

Commit

Permalink
Merge #2426 Ignore splitter exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
politas committed Apr 25, 2018
2 parents 17e2ae6 + 1ca841b commit 29c8025
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 9 additions & 1 deletion GUI/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions GUI/MainModInfo.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion GUI/MainModInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
}
}

Expand Down

0 comments on commit 29c8025

Please sign in to comment.