Skip to content

Commit

Permalink
Fix bug when changing UI style
Browse files Browse the repository at this point in the history
  • Loading branch information
DMagic1 committed Jan 29, 2020
1 parent 0bea533 commit 3435319
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SCANsat/SCAN_Unity/SCAN_UI_Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ public bool StockUIStyle
SCAN_UI_BigMap.Instance.Open();
}

if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible)
if (SCAN_UI_MainMap.Instance != null && SCAN_UI_MainMap.Instance.IsVisible && HighLogic.LoadedSceneIsFlight)
{
SCAN_UI_MainMap.Instance.Close();
SCAN_UI_MainMap.Instance.Open();
Expand All @@ -444,13 +444,13 @@ public bool StockUIStyle
SCAN_UI_ZoomMap.Instance.Open(true);
}

if (SCAN_UI_Instruments.Instance != null && SCAN_UI_Instruments.Instance.IsVisible)
if (SCAN_UI_Instruments.Instance != null && SCAN_UI_Instruments.Instance.IsVisible && HighLogic.LoadedSceneIsFlight)
{
SCAN_UI_Instruments.Instance.Close();
SCAN_UI_Instruments.Instance.Open();
}

if (SCAN_UI_Overlay.Instance != null && SCAN_UI_Overlay.Instance.IsVisible)
if (SCAN_UI_Overlay.Instance != null && SCAN_UI_Overlay.Instance.IsVisible && HighLogic.LoadedScene != GameScenes.SPACECENTER)
{
SCAN_UI_Overlay.Instance.Close();
SCAN_UI_Overlay.Instance.Open();
Expand Down

0 comments on commit 3435319

Please sign in to comment.