Skip to content

Commit 24f5626

Browse files
committed
Fix #14, #17: Disable the portrait gallery while PCR is active so it doesn't hide the internal space on VesselChanged events
1 parent 8e8d4f5 commit 24f5626

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ProbeControlRoom/ProbeControlRoom.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,9 @@ public bool startIVA()
348348
return false;
349349
}
350350

351+
// this prevents the portrait gallery from responding to VesselWasModified callbacks
352+
KerbalPortraitGallery.Instance.enabled = false;
353+
351354
// spawn the internal model
352355
if (aPart.internalModel == null)
353356
{
@@ -516,6 +519,9 @@ public void stopIVA()
516519
aPart.internalModel.gameObject.SetActive(false);
517520
}
518521

522+
// re-enable the portrait gallery
523+
KerbalPortraitGallery.Instance.enabled = true;
524+
519525
//Restore settings to levels prior to entering IVA
520526
if (ProbeControlRoomSettings.Instance.DisableSounds)
521527
{

0 commit comments

Comments
 (0)