From ac35d8330b553423bf3b77f6ae789270976f5d16 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 3 Apr 2011 21:18:33 +0900 Subject: [PATCH] card layout --- aqt/editor.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aqt/editor.py b/aqt/editor.py index 65ab94a6c..e1f1c83f6 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -705,8 +705,12 @@ class Editor(object): self.htmlEdit.setShown(toggle) def onCardLayout(self): - self.saveFields() - ui.clayout.CardLayout(self.parent, self, self.fact, self.card) + from aqt.clayout import CardLayout + if self.card: + type = 1; ord = self.card.ord + else: + type = 0; ord = 0 + CardLayout(self.mw, self.fact, type=type, ord=ord, parent=self.widget) # FIXME: in some future version, we should use a different delimiter, as # [sound] et al conflicts