From 93de5324cb1ddb0f72e65edd0a49920cfdae382b Mon Sep 17 00:00:00 2001 From: blowfish Date: Sun, 9 Jun 2019 15:05:31 -0700 Subject: [PATCH] Fix PAW resource removal in KSP 1.7.1 Resources that were removed from the part still had their widgets in the window --- B9PartSwitch/PartSwitch/ModuleB9PartSwitch.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/B9PartSwitch/PartSwitch/ModuleB9PartSwitch.cs b/B9PartSwitch/PartSwitch/ModuleB9PartSwitch.cs index 9b1a05be..f7f0bb7f 100644 --- a/B9PartSwitch/PartSwitch/ModuleB9PartSwitch.cs +++ b/B9PartSwitch/PartSwitch/ModuleB9PartSwitch.cs @@ -599,9 +599,12 @@ private void UpdateGeometry(bool start) private void UpdatePartActionWindow() { - var window = FindObjectsOfType().FirstOrDefault(w => w.part == part); - if (window.IsNotNull()) + foreach (UIPartActionWindow window in FindObjectsOfType()) + { + if (window.part != part) continue; + window.ClearList(); window.displayDirty = true; + } } private bool IsLastModuleAffectingDragCubes()