edit current window shouldn't be opened multiple times

This commit is contained in:
Damien Elmes 2012-05-26 22:55:46 +09:00
parent 5ab511e17a
commit 975ad62019
2 changed files with 3 additions and 3 deletions

View file

@ -30,10 +30,11 @@ except ImportError, e:
class DialogManager(object):
def __init__(self):
from aqt import addcards, browser
from aqt import addcards, browser, editcurrent
self._dialogs = {
"AddCards": [addcards.AddCards, None],
"Browser": [browser.Browser, None],
"EditCurrent": [editcurrent.EditCurrent, None],
}
def open(self, name, *args):

View file

@ -647,8 +647,7 @@ upload, overwriting any changes either here or on AnkiWeb. Proceed?""")):
aqt.dialogs.open("Browser", self)
def onEditCurrent(self):
from aqt.editcurrent import EditCurrent
EditCurrent(self)
aqt.dialogs.open("EditCurrent", self)
def onDeckConf(self, deck=None):
if not deck: