forked from nvaccess/nvda
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix EcoBraille and Lilly braille display drivers (nvaccess#17635)
Fixes nvaccess#17502 Summary of the issue: In nvaccess#15386, support was added for numRows and numCols on braille displays. Setting numCells explicitly would also set numCols. In nvaccess#17011, we're much more relying on numCols and numRows. For the eco braille and Lilli drivers, numCells was implemented by overriding _get_numCells. However this way, the setter of numCells would never be called and therefore numCols would always be 0. Description of user facing changes Fix braille for Eco Braille and Lilli displays. Description of development approach When calculating display dimensions on the braille handler, when display.numRows is 1, use display.numCells instead of display.numCols. This accounts for cases where numCells is implemented and numRows/numCols are not. Worked around the ZeroDevisionError when getting windowStartPost on a buffer Initialize _windowRowBufferOffsets to [(0, 0)] instead of [(0, 1)]. The latter suggests that the window contains one cell, which is not the case. @michaelDCurran you might want to check this.
- Loading branch information
1 parent
0abfd0f
commit 86ebd39
Showing
1 changed file
with
36 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters