From cc73789554d5e3986306556e62f2a608e78d6f31 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 4 Nov 2018 10:49:42 +0530 Subject: [PATCH] Fix random order of font family config choices in editor preview panel preferences --- src/calibre/gui2/tweak_book/preferences.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/tweak_book/preferences.py b/src/calibre/gui2/tweak_book/preferences.py index 508aefac5f..ea66fe41ec 100644 --- a/src/calibre/gui2/tweak_book/preferences.py +++ b/src/calibre/gui2/tweak_book/preferences.py @@ -348,7 +348,8 @@ class PreviewSettings(BasicSettings): w.setCurrentFont(QFont(val)) families = {'serif':_('Serif text'), 'sans':_('Sans-serif text'), 'mono':_('Monospaced text')} - for fam, text in families.iteritems(): + for fam in sorted(families): + text = families[fam] w = QFontComboBox(self) self('preview_%s_family' % fam, widget=w, getter=family_getter, setter=family_setter) l.addRow(_('Font family for &%s:') % text, w)