Skip to content

Commit

Permalink
Fix PAW resource removal in KSP 1.7.1
Browse files Browse the repository at this point in the history
Resources that were removed from the part still had their widgets in the window
  • Loading branch information
blowfishpro committed Jun 9, 2019
1 parent 16a2cda commit 93de532
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions B9PartSwitch/PartSwitch/ModuleB9PartSwitch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,12 @@ private void UpdateGeometry(bool start)

private void UpdatePartActionWindow()
{
var window = FindObjectsOfType<UIPartActionWindow>().FirstOrDefault(w => w.part == part);
if (window.IsNotNull())
foreach (UIPartActionWindow window in FindObjectsOfType<UIPartActionWindow>())
{
if (window.part != part) continue;
window.ClearList();
window.displayDirty = true;
}
}

private bool IsLastModuleAffectingDragCubes()
Expand Down

0 comments on commit 93de532

Please sign in to comment.