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

V2 of UI Automation in Windows Console: fix setEndPoint/compareEndPoints #10057

Merged
merged 12 commits into from
Aug 12, 2019

Conversation

codeofdusk
Copy link
Contributor

Link to issue number:

Closes #10035. Related to #9614. Identical to #10043.

Summary of the issue:

Braille does not properly track the system caret in Windows Console.

Description of how this pull request fixes the issue:

#9802 introduced a patched implementation of _get_isCollapsed. As suggested by @LeonarddeR, this code has been factored out into a new _endPointHelper method which normalizes endPoints for compareEndPoints and setEndPoint (used by _get_isCollapsed, Braille support, and possibly others).

Testing performed:

Tested that the isCollapsed property behaves as expected (in the Python console). Testing by @LeonarddeR indicates that Braille behaves as expected after the change.

Known issues with pull request:

None.

Change log entry:

None.

@codeofdusk
Copy link
Contributor Author

Cc @feerrenrut @LeonarddeR

source/NVDAObjects/UIA/winConsoleUIA.py Outdated Show resolved Hide resolved
source/NVDAObjects/UIA/winConsoleUIA.py Outdated Show resolved Hide resolved
source/NVDAObjects/UIA/winConsoleUIA.py Outdated Show resolved Hide resolved
source/NVDAObjects/UIA/winConsoleUIA.py Outdated Show resolved Hide resolved
source/NVDAObjects/UIA/winConsoleUIA.py Outdated Show resolved Hide resolved
source/NVDAObjects/UIA/winConsoleUIA.py Outdated Show resolved Hide resolved
source/NVDAObjects/UIA/winConsoleUIA.py Outdated Show resolved Hide resolved
source/NVDAObjects/UIA/winConsoleUIA.py Show resolved Hide resolved
@AppVeyorBot
Copy link

PR introduces Flake8 errors 😲

See test results for Failed build of commit 8d3e66f60a

otherEndPoint = "Start"
which = f"{selfEndPoint}To{otherEndPoint}"
return super().setEndPoint(other, which=which)

def _get_hasNoText(self):
def _get__isCollapsed(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually benefit from caching in this case? If not, I think I would prefer not to use the auto-property form and just name it def _isCollapsed(self)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, caching for this property would actually be pretty harmful if the text info is changes during one core cycle.

Copy link
Contributor

@feerrenrut feerrenrut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @codeofdusk

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

Successfully merging this pull request may close these issues.

UIA in Windows consoles: current character does not show up in braille
5 participants