mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-17 11:22:28 +12:00
Implemented fix for failed cursor iteration (#729)
A long time ago, I identified this failure but wasn't sure why it was failing. I still don't know why, but the emergency fix at least prevents other people from running into it. As a bonus, since we have a proper logging facility now, we can actually log it as I desired to do back then! This commit tentatively fixes issue 729.
This commit is contained in:
parent
32caf6aa04
commit
d6e472b939
|
@ -500,7 +500,10 @@ class MDEditView(textEditView):
|
|||
r3.setLeft(self.viewport().geometry().left())
|
||||
r3.setRight(self.viewport().geometry().right())
|
||||
refs.append(ClickThing(r3, rx, rx.capturedTexts()))
|
||||
cursor.movePosition(cursor.Down)
|
||||
if not cursor.movePosition(cursor.Down):
|
||||
# Super-rare failure. Leaving log message for future investigation.
|
||||
LOGGER.debug("Failed to move cursor down while calculating clickables. Aborting.")
|
||||
break
|
||||
|
||||
self.clickRects = refs
|
||||
|
||||
|
|
Loading…
Reference in a new issue