Skip to content

Input Gesture Dialog fix for when there is no filtered Input Gestures#12693

Merged
seanbudd merged 3 commits into
betafrom
fix-12673
Jul 28, 2021
Merged

Input Gesture Dialog fix for when there is no filtered Input Gestures#12693
seanbudd merged 3 commits into
betafrom
fix-12673

Conversation

@seanbudd

@seanbudd seanbudd commented Jul 28, 2021

Copy link
Copy Markdown
Member

Link to issue number:

Fixes #12673

Summary of the issue:

The input gestures GUI did not handle the case where there was no filtered input gestures available, such as filtering the gestures for a string like "zzzzzzzzz". This results in multiple input gesture dialogs being able to be opened at once.

This wx assertion error was also thrown while testing a preliminary fix for this.

DEBUG - gui.inputGestures._GesturesTree.getData (12:48:13.699) - MainThread (8444):
No filtered gestures available.
DEBUG - gui.inputGestures._GesturesTree.getData (12:48:13.702) - MainThread (8444):
No filtered gestures available.
ERROR - unhandled exception (12:48:13.702) - MainThread (8444):
Traceback (most recent call last):
  File "gui\inputGestures.py", line 642, in onTreeSelect
    self._refreshButtonState()
  File "gui\inputGestures.py", line 645, in _refreshButtonState
    selectedItems = self.tree.getSelectedItemData()
  File "gui\inputGestures.py", line 485, in getSelectedItemData
    selIdx: Tuple[int, ...] = self.GetIndexOfItem(selection)
  File "C:\nvda\.venv\lib\site-packages\wx\lib\mixins\treemixin.py", line 250, in GetIndexOfItem
    parent = self.GetItemParent(item)
wx._core.wxAssertionError: C++ assertion ""item.IsOk()"" failed at ..\..\src\msw\treectrl.cpp(1369) in wxTreeCtrl::GetItemParent(): invalid tree item

Description of how this pull request fixes the issue:

Add checks for when the filtered gesture list is empty.

Testing strategy:

Manual testing using the example from #12673

Unit testing this is difficult due to the need to spoof the wx.App

System testing this specific bug seems overkill, due to almost no user impact, however a smoke test for the input gestures dialog may be valuable.

Known issues with pull request:

None

Change log entries:

Bug fixes

- If no results are shown when filtering input gestures, the input gesture configuration dialog continues to work as expected. (#12673)

Code Review Checklist:

  • Pull Request description is up to date.
  • Unit tests.
  • System (end to end) tests.
  • Manual testing.
  • User Documentation.
  • Change log entry.
  • Context sensitive help for GUI changes.
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers

@seanbudd seanbudd requested a review from a team as a code owner July 28, 2021 03:30
@seanbudd seanbudd requested review from michaelDCurran and removed request for a team July 28, 2021 03:30
michaelDCurran
michaelDCurran previously approved these changes Jul 28, 2021
@seanbudd

Copy link
Copy Markdown
Member Author

@michaelDCurran - you'll have to reapprove it seems, pushing updates to changes dismissed you review

@seanbudd seanbudd merged commit 1ea7e2a into beta Jul 28, 2021
@seanbudd seanbudd deleted the fix-12673 branch July 28, 2021 04:26
@nvaccessAuto nvaccessAuto added this to the 2021.3 milestone Jul 28, 2021
@seanbudd seanbudd modified the milestones: 2021.3, 2021.2 Jul 28, 2021
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.

Error in the Input gesture manager allowing to open many instances of them

3 participants