mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1963699 [Inconsistent initial display of Tweaks dialog](https://bugs.launchpad.net/calibre/+bug/1963699)
This commit is contained in:
parent
47a24ae092
commit
a509c9cb38
@ -485,7 +485,9 @@ class ConfigWidget(ConfigWidgetBase):
|
||||
self.tweaks.set_plugin_tweaks(l)
|
||||
self.changed()
|
||||
|
||||
def current_changed(self, current, previous):
|
||||
def current_changed(self, *a):
|
||||
current = self.tweaks_view.currentIndex()
|
||||
if current.isValid():
|
||||
self.tweaks_view.scrollTo(current)
|
||||
tweak = self.tweaks.data(current, Qt.ItemDataRole.UserRole)
|
||||
self.help.setPlainText(tweak.doc)
|
||||
@ -497,6 +499,7 @@ class ConfigWidget(ConfigWidgetBase):
|
||||
def initialize(self):
|
||||
self.tweaks = self._model = Tweaks()
|
||||
self.tweaks_view.setModel(self.tweaks)
|
||||
self.tweaks_view.setCurrentIndex(self.tweaks_view.model().index(0))
|
||||
|
||||
def restore_to_default(self, *args):
|
||||
idx = self.tweaks_view.currentIndex()
|
||||
|
Loading…
x
Reference in New Issue
Block a user