Do sidebar switch check in browser init
https://github.com/ankitects/help-wanted/issues/6#issuecomment-706880794
This commit is contained in:
parent
82993d16fd
commit
7c1b855709
@ -586,10 +586,10 @@ class Browser(QMainWindow):
|
|||||||
col: Collection
|
col: Collection
|
||||||
editor: Optional[Editor]
|
editor: Optional[Editor]
|
||||||
|
|
||||||
def __init__(self, mw: AnkiQt, want_old_sidebar: bool = False) -> None:
|
def __init__(self, mw: AnkiQt) -> None:
|
||||||
QMainWindow.__init__(self, None, Qt.Window)
|
QMainWindow.__init__(self, None, Qt.Window)
|
||||||
self.mw = mw
|
self.mw = mw
|
||||||
self.want_old_sidebar = want_old_sidebar
|
self.want_old_sidebar = mw.app.queryKeyboardModifiers() & Qt.ShiftModifier
|
||||||
self.col = self.mw.col
|
self.col = self.mw.col
|
||||||
self.lastFilter = ""
|
self.lastFilter = ""
|
||||||
self.focusTo: Optional[int] = None
|
self.focusTo: Optional[int] = None
|
||||||
|
@ -1062,9 +1062,7 @@ title="%s" %s>%s</button>""" % (
|
|||||||
aqt.dialogs.open("AddCards", self)
|
aqt.dialogs.open("AddCards", self)
|
||||||
|
|
||||||
def onBrowse(self) -> None:
|
def onBrowse(self) -> None:
|
||||||
aqt.dialogs.open(
|
aqt.dialogs.open("Browser", self)
|
||||||
"Browser", self, self.app.queryKeyboardModifiers() & Qt.ShiftModifier
|
|
||||||
)
|
|
||||||
|
|
||||||
def onEditCurrent(self):
|
def onEditCurrent(self):
|
||||||
aqt.dialogs.open("EditCurrent", self)
|
aqt.dialogs.open("EditCurrent", self)
|
||||||
|
Loading…
Reference in New Issue
Block a user