diff --git a/Source/ConformalDecals/ModuleConformalDecal.cs b/Source/ConformalDecals/ModuleConformalDecal.cs index 1c91d33..8a42b7b 100644 --- a/Source/ConformalDecals/ModuleConformalDecal.cs +++ b/Source/ConformalDecals/ModuleConformalDecal.cs @@ -250,6 +250,7 @@ namespace ConformalDecals { if (HighLogic.LoadedSceneIsEditor) { GameEvents.onEditorPartEvent.Add(OnEditorEvent); GameEvents.onVariantApplied.Add(OnVariantApplied); + GameEvents.onEditorUndo.Add(OnEditorUndo); UpdateTweakables(); } @@ -287,6 +288,7 @@ namespace ConformalDecals { if (HighLogic.LoadedSceneIsEditor) { GameEvents.onEditorPartEvent.Remove(OnEditorEvent); GameEvents.onVariantApplied.Remove(OnVariantApplied); + GameEvents.onEditorUndo.Remove(OnEditorUndo); } if (HighLogic.LoadedSceneIsFlight) { @@ -350,6 +352,10 @@ namespace ConformalDecals { } } + protected void OnEditorUndo(ShipConstruct sc) { + UpdateTargets(); + } + protected void OnPartWillDie(Part willDie) { if (willDie == part.parent) { this.Log("Parent part about to be destroyed! Killing decal part.");