diff --git a/aqt/clayout.py b/aqt/clayout.py index 9b8dd75f4..86261c2eb 100644 --- a/aqt/clayout.py +++ b/aqt/clayout.py @@ -106,6 +106,8 @@ class CardLayout(QDialog): self.tabs.addTab(w, t['name']) def onRemoveTab(self, idx): + if len(self.model['tmpls']) < 2: + return showInfo(_("At least one template is required.")) if not askUser(_("Remove all cards of this type?")): return if not self.mm.remTemplate(self.model, self.cards[idx].template()): diff --git a/designer/debug.ui b/designer/debug.ui index 6f49cd645..200d0485a 100644 --- a/designer/debug.ui +++ b/designer/debug.ui @@ -31,7 +31,7 @@ - Qt::NoFocus + Qt::ClickFocus true