瀏覽代碼

logic error

Cary Sandvig 25 年之前
父節點
當前提交
4e9a2fec77
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      panda/src/gui/guiManager.cxx

+ 2 - 4
panda/src/gui/guiManager.cxx

@@ -210,10 +210,8 @@ INLINE bool overlap(GuiRegion* a, GuiRegion* b) {
   LVector4f av = a->get_frame();
   LVector4f bv = b->get_frame();
 
-  if (in_range(av[0], bv[0], bv[1]) ||
-      in_range(av[1], bv[0], bv[1]) ||
-      in_range(av[2], bv[2], bv[3]) ||
-      in_range(av[3], bv[2], bv[3]))
+  if ((in_range(av[0], bv[0], bv[1]) || in_range(av[1], bv[0], bv[1])) &&
+      (in_range(av[2], bv[2], bv[3]) || in_range(av[3], bv[2], bv[3])))
     return true;
   return false;
 }