Skip to content

Commit 7edac84

Browse files
sayAll: no longer prematurely stop sayAll after turning a page. (#14711)
Fixes #14390 Summary of the issue: With the merging of pr #14070 which added sayall in tables, SayAll in Kindle for PC would fail to continue reading after turning the page. Technical: Some of the code in the nextLine method in sayAll was refacted into a nextLineImpl method. However, if nextLineImpl returned false, finish would be called and nextLIne would return. This would be correct for handling the case where there was no more text, or table cells, but not the case where the page has just been turned. In fact, text sayAll already called finish when there was no more text, so calling finish again was useless in the base case, but for page turns caused sayAll to abort prematurely after the page was turned. Description of user facing changes NVDA no longer fails to keep reading with sayAll after crossing a page boundary. Description of development approach In sayAll's nextLine method, removed the call to self.finish when nextLineImpl returns False, but ensured that table sayAll's nextLineImpl does call finish itself if there is no more table cells. In other words, the self.finish call has been moved into the specific nextLineImpl method where it is needed, rather than running more broadly.
1 parent d5c0ead commit 7edac84

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎source/speech/sayAll.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ def nextLine(self):
267267

268268
if not self.initialIteration or not self.shouldReadInitialPosition():
269269
if not self.nextLineImpl():
270-
self.finish()
271270
return
272271
self.initialIteration = False
273272
bookmark = self.reader.bookmark
@@ -408,6 +407,7 @@ def nextLineImpl(self) -> bool:
408407
self.reader = self.nextLineFunc(self.reader)
409408
return True
410409
except StopIteration:
410+
self.finish()
411411
return False
412412

413413
def collapseLineImpl(self) -> bool:

‎user_docs/en/changes.t2t‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Same as pressing ``NVDA+k`` twice, but may be more useful for braille users. (#1
102102
- In web browsers such as Chrome and Firefox, alerts such as file downloads are shown in braille in addition to being spoken. (#14562)
103103
- Bug fixed when navigating to the first and last column in a table in Firefox (#14554)
104104
- When NVDA is launched with ``--lang=Windows`` parameter, it is again possible to open NVDA's General settings dialog. (#14407)
105+
- NVDA no longer fails to continue reading in Kindle for PC after turning the page. (#14390)
105106
-
106107

107108

0 commit comments

Comments
 (0)