浏览代码

Fixed issue where breakpoint configure from hover watch closes

Brian Fiete 5 年之前
父节点
当前提交
a9e8277836
共有 1 个文件被更改,包括 11 次插入1 次删除
  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();
         }