Skip to content

logicalToPhysicalPoint error #4125

@nvaccessAuto

Description

@nvaccessAuto

Reported by nishimotz on 2014-05-06 09:06
Japanese application Sakura Editor 2.1.1.2 raises error such as follows

ERROR - queueHandler.pumpAll (08:48:30):
error in generator 5
Traceback (most recent call last):
File "queueHandler.pyo", line 72, in pumpAll
File "sayAllHandler.pyo", line 151, in readTextHelper_generator
File "textInfos\offsets.pyo", line 473, in updateCaret
File "displayModel.pyo", line 543, in _setCaretOffset
TypeError: logicalToPhysicalPoint() takes exactly 3 arguments (2 given)

when Say All command is used.

Firstly confirmed with NVDAJP version, however, current NV Access master has the issue as well.

A patch was made as follows, and also committed as git@bitbucket.org:nishimotz/nvda.git branch displayModelFix.

diff --git a/source/displayModel.py b/source/displayModel.py
index e05b5ca..cdb50a0 100644
--- a/source/displayModel.py
+++ b/source/displayModel.py
@@ -540,7 +540,7 @@ class EditableTextDisplayModelTextInfo(DisplayModelTextInfo)
:
                left,top,right,bottom=rects[offset]
                x=left #+(right-left)/2
                y=top+(bottom-top)/2
-               x,y=windowUtils.logicalToPhysicalPoint(x,y)
+               x,y=windowUtils.logicalToPhysicalPoint(self.obj.windowHandle,x,y)
                oldX,oldY=winUser.getCursorPos()
                winUser.setCursorPos(x,y)
                winUser.mouse_event(winUser.MOUSEEVENTF_LEFTDOWN,0,0,None,None)

Similar issue is reported with Balabolka on the e-mail list, as well, but the issue is not yet filed as far as I know.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions