mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-10-30 10:12:25 -04: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
					
				| @ -16,7 +16,7 @@ from PyQt4.Qt import ( | ||||
|     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 @@ class WordsView(QTableView): | ||||
|         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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user