mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bottom most entries in keyboard shortcuts not editable
This commit is contained in:
parent
a1e63e9a53
commit
853e49d770
@ -558,7 +558,8 @@ class ShortcutConfig(QWidget): # {{{
|
|||||||
l.addWidget(self.view, 1, 0, 1, 3)
|
l.addWidget(self.view, 1, 0, 1, 3)
|
||||||
self.delegate = Delegate()
|
self.delegate = Delegate()
|
||||||
self.view.setItemDelegate(self.delegate)
|
self.view.setItemDelegate(self.delegate)
|
||||||
self.delegate.sizeHintChanged.connect(self.scrollTo)
|
self.delegate.sizeHintChanged.connect(self.editor_opened,
|
||||||
|
type=Qt.QueuedConnection)
|
||||||
self.delegate.changed_signal.connect(self.changed_signal)
|
self.delegate.changed_signal.connect(self.changed_signal)
|
||||||
self.search = SearchBox2(self)
|
self.search = SearchBox2(self)
|
||||||
self.search.initialize('shortcuts_search_history',
|
self.search.initialize('shortcuts_search_history',
|
||||||
@ -584,9 +585,8 @@ class ShortcutConfig(QWidget): # {{{
|
|||||||
self._model = ConfigModel(keyboard, parent=self)
|
self._model = ConfigModel(keyboard, parent=self)
|
||||||
self.view.setModel(self._model)
|
self.view.setModel(self._model)
|
||||||
|
|
||||||
def scrollTo(self, index):
|
def editor_opened(self, index):
|
||||||
if index is not None:
|
self.view.scrollTo(index, self.view.EnsureVisible)
|
||||||
self.view.scrollTo(index, self.view.PositionAtTop)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_editing(self):
|
def is_editing(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user