mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix yet another Enum problem.
This commit is contained in:
parent
ed10c21b76
commit
61db8c12be
@ -181,7 +181,7 @@ class CodeEditor(QPlainTextEdit):
|
|||||||
txt = blk.text()
|
txt = blk.text()
|
||||||
pos = blk.position()
|
pos = blk.position()
|
||||||
curs.setPosition(pos)
|
curs.setPosition(pos)
|
||||||
curs.setPosition(pos+len(txt), QTextCursor.KeepAnchor)
|
curs.setPosition(pos+len(txt), QTextCursor.MoveMode.KeepAnchor)
|
||||||
return txt
|
return txt
|
||||||
|
|
||||||
# Check if there is a selection. If not then only Shift-Tab is valid
|
# Check if there is a selection. If not then only Shift-Tab is valid
|
||||||
@ -213,7 +213,7 @@ class CodeEditor(QPlainTextEdit):
|
|||||||
end_position += 1
|
end_position += 1
|
||||||
# Restore the selection, adjusted for the added or deleted tabs
|
# Restore the selection, adjusted for the added or deleted tabs
|
||||||
cursor.setPosition(start_position)
|
cursor.setPosition(start_position)
|
||||||
cursor.setPosition(end_position, QTextCursor.KeepAnchor)
|
cursor.setPosition(end_position, QTextCursor.MoveMode.KeepAnchor)
|
||||||
self.setTextCursor(cursor)
|
self.setTextCursor(cursor)
|
||||||
ev.accept()
|
ev.accept()
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user