From a9e8277836145064f3fa91e8c2611b0bf59ac99c Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 19 May 2020 10:42:20 -0700 Subject: [PATCH] Fixed issue where breakpoint configure from hover watch closes --- IDE/src/ui/HoverWatch.bf | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/IDE/src/ui/HoverWatch.bf b/IDE/src/ui/HoverWatch.bf index 0e8be796..e9fd1581 100644 --- a/IDE/src/ui/HoverWatch.bf +++ b/IDE/src/ui/HoverWatch.bf @@ -413,7 +413,17 @@ namespace IDE.ui void HandleMouseDown(MouseEvent evt) { WidgetWindow widgetWindow = (WidgetWindow)evt.mSender; - if ((!(widgetWindow.mRootWidget is HoverWatch)) && (!(widgetWindow.mRootWidget is DarkMenuContainer)) && (!(widgetWindow.mRootWidget is DarkTooltipContainer))) + bool canClose = true; + + var checkWindow = widgetWindow; + while (checkWindow != null) + { + if ((checkWindow.mRootWidget is HoverWatch) || (widgetWindow.mRootWidget is DarkMenuContainer) || (widgetWindow.mRootWidget is DarkTooltipContainer)) + canClose = false; + checkWindow = checkWindow.mParent as WidgetWindow; + } + + if (canClose) Close(); }