mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-04 22:05:13 +01:00
...
This commit is contained in:
parent
d5278bfd5b
commit
fff1a25981
1 changed files with 4 additions and 4 deletions
|
|
@ -87,6 +87,10 @@ def cut(self):
|
|||
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 @@ def fset(self, val):
|
|||
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…
Reference in a new issue