mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
d5278bfd5b
commit
fff1a25981
@ -87,6 +87,10 @@ class PlainTextEdit(QPlainTextEdit):
|
||||
self.copy()
|
||||
self.textCursor().removeSelectedText()
|
||||
|
||||
@property
|
||||
def selected_text(self):
|
||||
return unicodedata.normalize('NFC', unicode(self.textCursor().selectedText()).replace(PARAGRAPH_SEPARATOR, '\n'))
|
||||
|
||||
def selection_changed(self):
|
||||
# Workaround Qt replacing nbsp with normal spaces on copy
|
||||
clipboard = QApplication.clipboard()
|
||||
@ -127,10 +131,6 @@ class TextEdit(PlainTextEdit):
|
||||
self.document().setModified(bool(val))
|
||||
return property(fget=fget, fset=fset)
|
||||
|
||||
@property
|
||||
def selected_text(self):
|
||||
return unicodedata.normalize('NFC', unicode(self.textCursor().selectedText()).replace(PARAGRAPH_SEPARATOR, '\n'))
|
||||
|
||||
def sizeHint(self):
|
||||
return self.size_hint
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user