From 9aedfc27994b200017363d117af575195ff25c10 Mon Sep 17 00:00:00 2001
From: chylex <contact@chylex.com>
Date: Mon, 4 Sep 2017 17:52:01 +0200
Subject: [PATCH] Fix scrollbar in Options not disappearing when switching tabs
 while animating

---
 Core/Other/FormSettings.cs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Core/Other/FormSettings.cs b/Core/Other/FormSettings.cs
index 75c1099b..c3811d20 100644
--- a/Core/Other/FormSettings.cs
+++ b/Core/Other/FormSettings.cs
@@ -128,11 +128,16 @@ private void SelectTab(SettingsTab tab){
                 tab.Control.OnReady();
             }
             
+            panelContents.VerticalScroll.Enabled = false; // required to stop animation that would otherwise break everything
+            panelContents.PerformLayout();
+
             panelContents.SuspendLayout();
             panelContents.VerticalScroll.Value = 0; // https://gfycat.com/GrotesqueTastyAstarte
             panelContents.Controls.Clear();
             panelContents.Controls.Add(tab.Control);
             panelContents.ResumeLayout(true);
+
+            panelContents.VerticalScroll.Enabled = true;
             panelContents.Focus();
 
             currentTab = tab;