Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logicalToPhysicalPoint error #4125

Closed
nvaccessAuto opened this issue May 6, 2014 · 2 comments
Closed

logicalToPhysicalPoint error #4125

nvaccessAuto opened this issue May 6, 2014 · 2 comments

Comments

@nvaccessAuto
Copy link

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.

@nvaccessAuto
Copy link
Author

Comment 1 by jteh on 2014-05-07 22:34
Thanks for reporting. This fix should go into 2014.2.
Changes:
Milestone changed from None to 2014.2

@nvaccessAuto
Copy link
Author

Comment 2 by Michael Curran <mick@... on 2014-05-08 22:27
In [e42c0be]:

EditableTextDisplayModelTextInfo._setCaretOffset: fix call to logicalToPhysicalPoint. Fixes #4125

Changes:
State: closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants