update end of selection when using click + shift
This commit is contained in:
@@ -178,7 +178,13 @@ class InnerBigText(QWidget):
|
||||
self.parent.v_scroll_bar.setValue(self._byte_offset)
|
||||
|
||||
def mousePressEvent(self, e: QtGui.QMouseEvent) -> None:
|
||||
if e.buttons() == Qt.MouseButton.LeftButton:
|
||||
if e.buttons() == Qt.MouseButton.LeftButton and e.modifiers() == Qt.KeyboardModifier.ShiftModifier:
|
||||
offset = self.to_byte_offset(e)
|
||||
self.selection_highlight.set_end_byte(offset)
|
||||
self.update()
|
||||
return
|
||||
|
||||
if e.buttons() == Qt.MouseButton.LeftButton and e.modifiers() == Qt.KeyboardModifier.NoModifier:
|
||||
offset = self.to_byte_offset(e)
|
||||
self.selection_highlight.set_start(offset)
|
||||
self.selection_highlight.set_end_byte(offset)
|
||||
|
||||
Reference in New Issue
Block a user