From cbb538c741546513eec543ffa08b6b6eaeef0a77 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 29 Oct 2010 19:26:02 +0900 Subject: [PATCH] remove model tags, treat name as tags like card templates --- ankiqt/ui/modelproperties.py | 4 +--- designer/modelproperties.ui | 27 +++++---------------------- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/ankiqt/ui/modelproperties.py b/ankiqt/ui/modelproperties.py index dea03c465..8fb49ad14 100644 --- a/ankiqt/ui/modelproperties.py +++ b/ankiqt/ui/modelproperties.py @@ -39,7 +39,6 @@ class ModelProperties(QDialog): def readData(self): # properties section self.dialog.name.setText(self.m.name) - self.dialog.tags.setText(self.m.tags) self.dialog.spacing.setText(str(self.m.spacing)) self.dialog.initialSpacing.setText(str(self.m.initialSpacing/60)) self.dialog.mediaURL.setText(unicode(self.m.features)) @@ -467,8 +466,7 @@ order by n""", id=card.id) if not mname: mname = _("Model") self.updateField(self.m, 'name', mname) - self.updateField(self.m, 'tags', - unicode(self.dialog.tags.text())) + self.updateField(self.m, 'tags', mname) url = unicode(self.dialog.mediaURL.text()) if url: if not re.match("^(http|https|ftp)://", url, re.I): diff --git a/designer/modelproperties.ui b/designer/modelproperties.ui index 77dbcb42a..13261a71c 100644 --- a/designer/modelproperties.ui +++ b/designer/modelproperties.ui @@ -62,22 +62,6 @@ - - - <b>Tags</b> - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - true - - - - - - - <b>Minimum spacing</b> @@ -87,7 +71,7 @@ - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -101,28 +85,28 @@ p, li { white-space: pre-wrap; } - + - + - + <b>Media URL</B> - + @@ -512,7 +496,6 @@ p, li { white-space: pre-wrap; } tabWidget name - tags initialSpacing spacing mediaURL