From 257e8dba26e50bfd63e3c23520e1f9053c80582f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 18 Jun 2017 15:30:09 +0530 Subject: [PATCH] Restore visual order for layout buttons in the popup --- src/calibre/gui2/layout_menu.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/calibre/gui2/layout_menu.py b/src/calibre/gui2/layout_menu.py index 0992a5fdf6..58b3c4983d 100644 --- a/src/calibre/gui2/layout_menu.py +++ b/src/calibre/gui2/layout_menu.py @@ -8,7 +8,6 @@ from PyQt5.Qt import ( QFontMetrics, QHBoxLayout, QIcon, QMenu, QPainter, QPushButton, QSize, QSizePolicy, Qt, QWidget, QStyleOption, QStyle) -from calibre.utils.icu import primary_sort_key ICON_SZ = 64 @@ -99,8 +98,7 @@ class LayoutMenu(QMenu): b.setVisible(False), b.setCheckable(True), b.setChecked(b.text() in 'tags grid') b.label = b.text().capitalize() else: - buttons = sorted( - parent.layout_buttons, key=lambda b: primary_sort_key(b.label)) + buttons = parent.layout_buttons for b in buttons: self.items.append(LayoutItem(b, self)) l.addWidget(self.items[-1])