mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix handling of font family comboboxes in LRF Output settings
This commit is contained in:
parent
1c8c0400bb
commit
25538e5c04
@ -45,9 +45,11 @@ class PluginWidget(Widget, Ui_Form):
|
|||||||
def set_value_handler(self, g, val):
|
def set_value_handler(self, g, val):
|
||||||
if unicode(g.objectName()) in ('opt_serif_family',
|
if unicode(g.objectName()) in ('opt_serif_family',
|
||||||
'opt_sans_family', 'opt_mono_family'):
|
'opt_sans_family', 'opt_mono_family'):
|
||||||
idx = g.findText(val, Qt.MatchFixedString)
|
idx = -1
|
||||||
|
if val:
|
||||||
|
idx = g.findText(val, Qt.MatchFixedString)
|
||||||
if idx < 0:
|
if idx < 0:
|
||||||
idx = 0
|
idx = 0
|
||||||
g.setCurrentIndex(0)
|
g.setCurrentIndex(idx)
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user