[orca] Immediately return given bogus extents when determining what's onscreen



commit aa639d19bfb88f07013cfa8378577f15871490e7
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Tue Jan 29 00:48:25 2019 -0500

    Immediately return given bogus extents when determining what's onscreen

 src/orca/script_utilities.py | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/orca/script_utilities.py b/src/orca/script_utilities.py
index 1a0c9ba80..2427e1353 100644
--- a/src/orca/script_utilities.py
+++ b/src/orca/script_utilities.py
@@ -1862,6 +1862,14 @@ class Utilities:
             debug.println(debug.LEVEL_INFO, msg, True)
             return False
 
+        msg = "INFO: Extents for %s are: %s" % (obj, box)
+        debug.println(debug.LEVEL_INFO, msg, True)
+
+        if box.x > 10000 or box.y > 10000:
+            msg = "INFO: %s seems to have bogus coordinates" % obj
+            debug.println(debug.LEVEL_INFO, msg, True)
+            return False
+
         if box.x < 0 and box.y < 0:
             msg = "INFO: %s has negative coordinates" % obj
             debug.println(debug.LEVEL_INFO, msg, True)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]