Loading ballontranslator/ui/canvas.py +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ try: from qtpy.QtWidgets import QUndoStack except: from PyQt6.QtGui import QUndoStack from qtpy.QtGui import QUndoStack from .misc import ndarray2pixmap, ProjImgTrans from .textitem import TextBlkItem, TextBlock Loading ballontranslator/ui/textlayout.py +2 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,8 @@ class VerticalTextDocumentLayout(QAbstractTextDocumentLayout): blpos = block.position() bllen = block.length() selections = [] for sel in context.selections: context_sel = context.selections for sel in context_sel: selStart = sel.cursor.selectionStart() - blpos selEnd = sel.cursor.selectionEnd() - blpos if selStart < bllen and selEnd > 0 and selEnd > selStart: Loading Loading
ballontranslator/ui/canvas.py +1 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ try: from qtpy.QtWidgets import QUndoStack except: from PyQt6.QtGui import QUndoStack from qtpy.QtGui import QUndoStack from .misc import ndarray2pixmap, ProjImgTrans from .textitem import TextBlkItem, TextBlock Loading
ballontranslator/ui/textlayout.py +2 −1 Original line number Diff line number Diff line Loading @@ -92,7 +92,8 @@ class VerticalTextDocumentLayout(QAbstractTextDocumentLayout): blpos = block.position() bllen = block.length() selections = [] for sel in context.selections: context_sel = context.selections for sel in context_sel: selStart = sel.cursor.selectionStart() - blpos selEnd = sel.cursor.selectionEnd() - blpos if selStart < bllen and selEnd > 0 and selEnd > selStart: Loading