Close windows when text part is destroyed

feature-saving
Andrew Cassidy 3 years ago
parent dbbc621181
commit 06137357c1

@ -210,7 +210,12 @@ namespace ConformalDecals {
public override void OnDestroy() {
if (HighLogic.LoadedSceneIsGame && _currentText != null) TextRenderer.UnregisterText(_currentText);
// close all UIs
if (_textEntryController != null) _textEntryController.Close();
if (_fillColorPickerController != null) _fillColorPickerController.Close();
if (_outlineColorPickerController != null) _outlineColorPickerController.Close();
base.OnDestroy();
}

Loading…
Cancel
Save