Close constructed widgets

- Issue MatterHackers/MCCentral#4739
DynamicPopupContent popups construct and fail to close their
generated widget
This commit is contained in:
John Lewin 2018-12-19 18:00:13 -08:00
parent e3a748f45d
commit 390b6fd59e

View file

@ -161,6 +161,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
popupWidget = null;
this.PopupWindowClosed?.Invoke(this, null);
// If DynamicPopupContent is used, we need to close the PopupContent reference as it's constructed every time
if (this.DynamicPopupContent != null)
{
this.PopupContent.Close();
}
};
if (overridePopupHAnchor)