From 03b0ff45654204649dd512ca9accfeed374c09e0 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 11 Aug 2017 21:44:05 +1000 Subject: [PATCH] tidy up card name list --- aqt/clayout.py | 9 +-------- designer/clayout_top.ui | 9 ++++++++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/aqt/clayout.py b/aqt/clayout.py index 37ca02dbb..796ca0053 100644 --- a/aqt/clayout.py +++ b/aqt/clayout.py @@ -89,18 +89,11 @@ class CardLayout(QDialog): self.redrawing = True combo = self.topAreaForm.templatesBox combo.clear() - combo.addItems(self._templateNameIncludingOrdinal(t) for t in self.model['tmpls']) + combo.addItems(self._summarizedName(t) for t in self.model['tmpls']) combo.setCurrentIndex(self.ord) combo.setEnabled(not self._isCloze()) self.redrawing = False - def _templateNameIncludingOrdinal(self, tmpl): - return _("Card Type %(n)d of %(total)d: %(name)s") % dict( - n=tmpl['ord']+1, - total=len(self.model['tmpls']), - name=self._summarizedName(tmpl), - ) - def _summarizedName(self, tmpl): return "{}: {} -> {}".format( tmpl['name'], diff --git a/designer/clayout_top.ui b/designer/clayout_top.ui index ca7590f62..4ff19d9d3 100644 --- a/designer/clayout_top.ui +++ b/designer/clayout_top.ui @@ -23,8 +23,15 @@ - -1 + 12 + + + + Card Type: + + +