Close windows when text part is destroyed

This commit is contained in:
Andrew Cassidy 2020-11-14 21:15:43 -08:00
parent dbbc621181
commit 06137357c1
2 changed files with 6 additions and 1 deletions

View File

@ -211,6 +211,11 @@ namespace ConformalDecals {
public override void OnDestroy() { public override void OnDestroy() {
if (HighLogic.LoadedSceneIsGame && _currentText != null) TextRenderer.UnregisterText(_currentText); 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(); base.OnDestroy();
} }