Commit c3527ed6 authored by Joanmarie Diggs's avatar Joanmarie Diggs

Mouse Review: Don't take active doc into account unless obj is in a document

parent a3b20a39
......@@ -490,10 +490,6 @@ class MouseReviewer:
debug.println(debug.LEVEL_INFO, msg, True)
menu = None
document = None
if script.utilities.inDocumentContent():
document = script.utilities.activeDocument()
screen, nowX, nowY = self._pointer.get_position()
if (pX, pY) != (nowX, nowY):
msg = "MOUSE REVIEW: Pointer moved again: (%i, %i)" % (nowX, nowY)
......@@ -501,7 +497,6 @@ class MouseReviewer:
return
obj = script.utilities.descendantAtPoint(menu, pX, pY) \
or script.utilities.descendantAtPoint(document, pX, pY) \
or script.utilities.descendantAtPoint(window, pX, pY)
msg = "MOUSE REVIEW: Object at (%i, %i) is %s" % (pX, pY, obj)
debug.println(debug.LEVEL_INFO, msg, True)
......@@ -513,10 +508,13 @@ class MouseReviewer:
debug.println(debug.LEVEL_INFO, msg, True)
return
if document and obj and document != script.utilities.getContainingDocument(obj):
msg = "MOUSE REVIEW: %s is not in active document %s" % (obj, document)
debug.println(debug.LEVEL_INFO, msg, True)
return
objDocument = script.utilities.getContainingDocument(obj)
if objDocument and script.utilities.inDocumentContent():
document = script.utilities.activeDocument()
if document != objDocument:
msg = "MOUSE REVIEW: %s is not in active document %s" % (obj, document)
debug.println(debug.LEVEL_INFO, msg, True)
return
if obj and obj.getRole() in script.utilities.getCellRoles() \
and script.utilities.shouldReadFullRow(obj):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment