mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Book lists: Do not start editing at any key press. Also double clicking now opens the viewer instead of editing. To edit, single click a selected row instead of double clicking or press the F2 key (Enter on OS X). Fixes #7364 (Mom mode tweak to prevent unintended title change)
This commit is contained in:
parent
6528aa6fd1
commit
80079ebc0f
@ -35,7 +35,6 @@ class ViewAction(InterfaceAction):
|
||||
self.qaction.setMenu(self.view_menu)
|
||||
ac.triggered.connect(self.view_specific_format, type=Qt.QueuedConnection)
|
||||
|
||||
|
||||
def location_selected(self, loc):
|
||||
enabled = loc == 'library'
|
||||
for action in list(self.view_menu.actions())[1:]:
|
||||
@ -134,6 +133,9 @@ class ViewAction(InterfaceAction):
|
||||
rows = self.gui.current_view().selectionModel().selectedRows()
|
||||
self._view_books(rows)
|
||||
|
||||
def view_triggered(self, index):
|
||||
self._view_books([index])
|
||||
|
||||
def view_specific_book(self, index):
|
||||
self._view_books([index])
|
||||
|
||||
|
@ -50,6 +50,8 @@ class BooksView(QTableView): # {{{
|
||||
def __init__(self, parent, modelcls=BooksModel):
|
||||
QTableView.__init__(self, parent)
|
||||
|
||||
self.setEditTriggers(self.SelectedClicked|self.EditKeyPressed)
|
||||
|
||||
self.drag_allowed = True
|
||||
self.setDragEnabled(True)
|
||||
self.setDragDropOverwriteMode(False)
|
||||
@ -98,6 +100,8 @@ class BooksView(QTableView): # {{{
|
||||
self._model.about_to_be_sorted.connect(self.about_to_be_sorted)
|
||||
self._model.sorting_done.connect(self.sorting_done)
|
||||
|
||||
self.doubleClicked.connect(parent.iactions['View'].view_triggered)
|
||||
|
||||
# Column Header Context Menu {{{
|
||||
def column_header_context_handler(self, action=None, column=None):
|
||||
if not action or not column:
|
||||
|
@ -338,6 +338,8 @@ Calibre has several keyboard shortcuts to save you time and mouse movement. Thes
|
||||
|
||||
* - Keyboard Shortcut
|
||||
- Action
|
||||
* - :kbd:`F2 (Enter in OS X)`
|
||||
- Edit the metadata of the currently selected field in the book list.
|
||||
* - :kbd:`A`
|
||||
- Add Books
|
||||
* - :kbd:`C`
|
||||
|
Loading…
x
Reference in New Issue
Block a user