mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 09:16:38 -04:00
edit current window shouldn't be opened multiple times
This commit is contained in:
parent
5ab511e17a
commit
975ad62019
2 changed files with 3 additions and 3 deletions
|
@ -30,10 +30,11 @@ except ImportError, e:
|
||||||
class DialogManager(object):
|
class DialogManager(object):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
from aqt import addcards, browser
|
from aqt import addcards, browser, editcurrent
|
||||||
self._dialogs = {
|
self._dialogs = {
|
||||||
"AddCards": [addcards.AddCards, None],
|
"AddCards": [addcards.AddCards, None],
|
||||||
"Browser": [browser.Browser, None],
|
"Browser": [browser.Browser, None],
|
||||||
|
"EditCurrent": [editcurrent.EditCurrent, None],
|
||||||
}
|
}
|
||||||
|
|
||||||
def open(self, name, *args):
|
def open(self, name, *args):
|
||||||
|
|
|
@ -647,8 +647,7 @@ upload, overwriting any changes either here or on AnkiWeb. Proceed?""")):
|
||||||
aqt.dialogs.open("Browser", self)
|
aqt.dialogs.open("Browser", self)
|
||||||
|
|
||||||
def onEditCurrent(self):
|
def onEditCurrent(self):
|
||||||
from aqt.editcurrent import EditCurrent
|
aqt.dialogs.open("EditCurrent", self)
|
||||||
EditCurrent(self)
|
|
||||||
|
|
||||||
def onDeckConf(self, deck=None):
|
def onDeckConf(self, deck=None):
|
||||||
if not deck:
|
if not deck:
|
||||||
|
|
Loading…
Reference in a new issue