From e1c1e617bcee19c5aa22c173c2b151837e3497fc Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 28 Sep 2015 01:43:46 +0530 Subject: [PATCH] Edit Book: Fix order of checkboxes in filter style information tool is random --- src/calibre/gui2/tweak_book/widgets.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/tweak_book/widgets.py b/src/calibre/gui2/tweak_book/widgets.py index f21571a878..c51a784337 100644 --- a/src/calibre/gui2/tweak_book/widgets.py +++ b/src/calibre/gui2/tweak_book/widgets.py @@ -923,8 +923,9 @@ class FilterCSS(Dialog): # {{{ l.addRow(QLabel(_('Select what style information you want completely removed:'))) self.h = h = QHBoxLayout() - for name, text in { - 'fonts':_('&Fonts'), 'margins':_('&Margins'), 'padding':_('&Padding'), 'floats':_('Flo&ats'), 'colors':_('&Colors')}.iteritems(): + for name, text in ( + ('fonts', _('&Fonts')), ('margins', _('&Margins')), ('padding', _('&Padding')), ('floats', _('Flo&ats')), ('colors', _('&Colors')), + ): c = QCheckBox(text) setattr(self, 'opt_' + name, c) h.addWidget(c)