Browse Source

Fixed issue where breakpoint configure from hover watch closes

Brian Fiete 5 years ago
parent
commit
a9e8277836
1 changed files with 11 additions and 1 deletions
  1. 11 1
      IDE/src/ui/HoverWatch.bf

+ 11 - 1
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();
         }