mirror of
https://github.com/ankitects/anki.git
synced 2025-11-10 14:47:12 -05:00
Make search first (default) mode
This commit is contained in:
parent
4a1e995934
commit
47e1e62967
1 changed files with 3 additions and 3 deletions
|
|
@ -245,9 +245,9 @@ class SidebarModel(QAbstractItemModel):
|
||||||
|
|
||||||
|
|
||||||
class SidebarToolbar(QToolBar):
|
class SidebarToolbar(QToolBar):
|
||||||
_tools: Tuple[SidebarTool, str, str] = (
|
_tools: Tuple[Tuple[SidebarTool, str, str], ...] = (
|
||||||
(SidebarTool.SELECT, ":/icons/select.svg", "select"),
|
|
||||||
(SidebarTool.SEARCH, ":/icons/magnifying_glass.svg", "search"),
|
(SidebarTool.SEARCH, ":/icons/magnifying_glass.svg", "search"),
|
||||||
|
(SidebarTool.SELECT, ":/icons/select.svg", "select"),
|
||||||
(SidebarTool.EDIT, ":/icons/edit.svg", "edit"),
|
(SidebarTool.EDIT, ":/icons/edit.svg", "edit"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -268,7 +268,7 @@ class SidebarToolbar(QToolBar):
|
||||||
self._action_group.actions()[active].setChecked(True)
|
self._action_group.actions()[active].setChecked(True)
|
||||||
self.sidebar.tool = self._tools[active][0]
|
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)
|
index = self._action_group.actions().index(action)
|
||||||
self.sidebar.col.set_config("sidebarTool", index)
|
self.sidebar.col.set_config("sidebarTool", index)
|
||||||
self.sidebar.tool = self._tools[index][0]
|
self.sidebar.tool = self._tools[index][0]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue