From 47e1e6296756211e057869c1b26eda7ad0167edd Mon Sep 17 00:00:00 2001 From: RumovZ Date: Thu, 25 Feb 2021 19:28:29 +0100 Subject: [PATCH] Make search first (default) mode --- qt/aqt/sidebar.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qt/aqt/sidebar.py b/qt/aqt/sidebar.py index 163d8aded..56f55ee0f 100644 --- a/qt/aqt/sidebar.py +++ b/qt/aqt/sidebar.py @@ -245,9 +245,9 @@ class SidebarModel(QAbstractItemModel): class SidebarToolbar(QToolBar): - _tools: Tuple[SidebarTool, str, str] = ( - (SidebarTool.SELECT, ":/icons/select.svg", "select"), + _tools: Tuple[Tuple[SidebarTool, str, str], ...] = ( (SidebarTool.SEARCH, ":/icons/magnifying_glass.svg", "search"), + (SidebarTool.SELECT, ":/icons/select.svg", "select"), (SidebarTool.EDIT, ":/icons/edit.svg", "edit"), ) @@ -268,7 +268,7 @@ class SidebarToolbar(QToolBar): self._action_group.actions()[active].setChecked(True) self.sidebar.tool = self._tools[active][0] - def _on_action_group_triggered(self, action) -> None: + def _on_action_group_triggered(self, action: QAction) -> None: index = self._action_group.actions().index(action) self.sidebar.col.set_config("sidebarTool", index) self.sidebar.tool = self._tools[index][0]