always start in first sidebar mode
I didn't notice anyone objecting; let's see how this is received. https://forums.ankiweb.net/t/anki-2-1-45-alpha/10061/35
This commit is contained in:
parent
adcdb422c5
commit
5a8f534f00
@ -40,12 +40,11 @@ class SidebarToolbar(QToolBar):
|
||||
action.setCheckable(True)
|
||||
action.setShortcut(f"Alt+{row + 1}")
|
||||
self._action_group.addAction(action)
|
||||
saved = self.sidebar.col.get_config("sidebarTool", 0)
|
||||
active = saved if saved < len(self._tools) else 0
|
||||
# always start with first tool
|
||||
active = 0
|
||||
self._action_group.actions()[active].setChecked(True)
|
||||
self.sidebar.tool = self._tools[active][0]
|
||||
|
||||
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]
|
||||
|
Loading…
Reference in New Issue
Block a user