mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Copy should only copy selected text if there is any
This commit is contained in:
parent
35f770955e
commit
69a9ffadf5
@ -580,7 +580,8 @@ class DateTimeEdit(QDateTimeEdit):
|
||||
@property
|
||||
def mime_data_for_copy(self):
|
||||
md = QMimeData()
|
||||
md.setText(self.dateTime().toString())
|
||||
text = self.lineEdit().selectedText()
|
||||
md.setText(text or self.dateTime().toString())
|
||||
md.setData(self.MIME_TYPE, self.dateTime().toString(Qt.ISODate).encode('ascii'))
|
||||
return md
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user