Skip to content

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

Merged
feerrenrut merged 12 commits into
nvaccess:masterfrom
codeofdusk:cmduia10-fix-compareendpoints
Aug 12, 2019
Merged

V2 of UI Automation in Windows Console: fix setEndPoint/compareEndPoints#10057
feerrenrut merged 12 commits into
nvaccess:masterfrom
codeofdusk:cmduia10-fix-compareendpoints

Conversation

@codeofdusk

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Cc @feerrenrut @LeonarddeR

Comment thread source/NVDAObjects/UIA/winConsoleUIA.py Outdated
Comment thread source/NVDAObjects/UIA/winConsoleUIA.py Outdated
Comment thread source/NVDAObjects/UIA/winConsoleUIA.py Outdated
Comment thread source/NVDAObjects/UIA/winConsoleUIA.py Outdated
Comment thread source/NVDAObjects/UIA/winConsoleUIA.py Outdated
Comment thread source/NVDAObjects/UIA/winConsoleUIA.py Outdated
Comment thread source/NVDAObjects/UIA/winConsoleUIA.py Outdated
Comment thread source/NVDAObjects/UIA/winConsoleUIA.py
codeofdusk and others added 2 commits August 8, 2019 09:32
Co-Authored-By: Reef Turner <feerrenrut@users.noreply.github.com>
@AppVeyorBot

Copy link
Copy Markdown

PR introduces Flake8 errors 😲

See test results for Failed build of commit 8d3e66f60a

Comment thread source/NVDAObjects/UIA/winConsoleUIA.py Outdated
return super().setEndPoint(other, which=which)

def _get_hasNoText(self):
def _get__isCollapsed(self):

Copy link
Copy Markdown
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
Copy Markdown
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.

@feerrenrut feerrenrut left a comment

Copy link
Copy Markdown
Contributor

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