Skip to content
This repository has been archived by the owner on Nov 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #124 from savagerose/master
Browse files Browse the repository at this point in the history
Tweaks to the workaround for KSP-CKAN/CKAN#760
  • Loading branch information
RichardLake committed May 19, 2015
2 parents 831b938 + 33d8774 commit b302f93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TabController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private void OnDeselect(object sender, TabControlCancelEventArgs args)
}
else if (Platform.IsMac)
{
if (args.Action == TabControlAction.Deselecting)
if (args.Action == TabControlAction.Deselecting && args.TabPage != null)
{
// Have to set visibility to false on children controls on hidden tabs because they don't
// always heed parent visibility on Mac OS X https://bugzilla.xamarin.com/show_bug.cgi?id=3124
Expand All @@ -149,7 +149,7 @@ private void OnDeselect(object sender, TabControlCancelEventArgs args)
control.Visible = false;
}
}
else if (args.Action == TabControlAction.Selecting)
else if (args.Action == TabControlAction.Selecting && args.TabPage != null)
{
// Set children controls' visibility back to true
foreach (Control control in args.TabPage.Controls)
Expand All @@ -164,7 +164,7 @@ private void OnDeselect(object sender, TabControlCancelEventArgs args)
Task.Factory.StartNew(
() =>
{
Thread.Sleep(300);
Thread.Sleep(500);
((SplitContainer)control).Panel1.Refresh();
});
Expand Down

0 comments on commit b302f93

Please sign in to comment.