mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-20 04:26:00 +01:00
Spellcheck dialog: Pressing Ctrl+C on the words list copies only selected words, regardless of current cell
This commit is contained in:
parent
3726f69d54
commit
7e5cdd0330
1 changed files with 5 additions and 1 deletions
|
|
@ -16,7 +16,7 @@
|
|||
QStackedLayout, QLabel, QVBoxLayout, QWidget, QPushButton, QIcon, QMenu,
|
||||
QDialogButtonBox, QLineEdit, QDialog, QToolButton, QFormLayout, QHBoxLayout,
|
||||
pyqtSignal, QAbstractTableModel, QModelIndex, QTimer, QTableView, QCheckBox,
|
||||
QComboBox, QListWidget, QListWidgetItem, QInputDialog, QPlainTextEdit)
|
||||
QComboBox, QListWidget, QListWidgetItem, QInputDialog, QPlainTextEdit, QKeySequence)
|
||||
|
||||
from calibre.constants import __appname__, plugins
|
||||
from calibre.ebooks.oeb.polish.spell import replace_word, get_all_words, merge_locations
|
||||
|
|
@ -762,6 +762,10 @@ def __init__(self, parent=None):
|
|||
self.verticalHeader().close()
|
||||
|
||||
def keyPressEvent(self, ev):
|
||||
if ev == QKeySequence.Copy:
|
||||
self.copy_to_clipboard()
|
||||
ev.accept()
|
||||
return
|
||||
ret = QTableView.keyPressEvent(self, ev)
|
||||
if ev.key() in (Qt.Key_PageUp, Qt.Key_PageDown, Qt.Key_Up, Qt.Key_Down):
|
||||
idx = self.currentIndex()
|
||||
|
|
|
|||
Loading…
Reference in a new issue