mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
don't error when editing options of filtered deck from deck list
This commit is contained in:
parent
f53a8f122e
commit
e2300abb82
2 changed files with 3 additions and 3 deletions
|
@ -9,10 +9,10 @@ from aqt.utils import showInfo, showWarning, openHelp, getOnlyText, askUser
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
|
|
||||||
class DeckConf(QDialog):
|
class DeckConf(QDialog):
|
||||||
def __init__(self, mw, first=False, search=""):
|
def __init__(self, mw, first=False, search="", deck=None):
|
||||||
QDialog.__init__(self, mw)
|
QDialog.__init__(self, mw)
|
||||||
self.mw = mw
|
self.mw = mw
|
||||||
self.deck = self.mw.col.decks.current()
|
self.deck = deck or self.mw.col.decks.current()
|
||||||
# context-sensitive extras like deck:foo
|
# context-sensitive extras like deck:foo
|
||||||
self.search = search
|
self.search = search
|
||||||
self.form = aqt.forms.dyndconf.Ui_Dialog()
|
self.form = aqt.forms.dyndconf.Ui_Dialog()
|
||||||
|
|
|
@ -649,7 +649,7 @@ upload, overwriting any changes either here or on AnkiWeb. Proceed?""")):
|
||||||
deck = self.col.decks.current()
|
deck = self.col.decks.current()
|
||||||
if deck['dyn']:
|
if deck['dyn']:
|
||||||
import aqt.dyndeckconf
|
import aqt.dyndeckconf
|
||||||
aqt.dyndeckconf.DeckConf(self)
|
aqt.dyndeckconf.DeckConf(self, deck=deck)
|
||||||
else:
|
else:
|
||||||
import aqt.deckconf
|
import aqt.deckconf
|
||||||
aqt.deckconf.DeckConf(self, deck)
|
aqt.deckconf.DeckConf(self, deck)
|
||||||
|
|
Loading…
Reference in a new issue