This commit is contained in:
Kovid Goyal 2015-01-09 13:47:30 +05:30
parent a0a97cf1be
commit b564245480

View File

@ -490,7 +490,7 @@ class EditSnippet(QWidget):
i = self.types.item(i) i = self.types.item(i)
ftype = i.data(Qt.UserRole) ftype = i.data(Qt.UserRole)
i.setCheckState(Qt.Checked if ftype in ftypes else Qt.Unchecked) i.setCheckState(Qt.Checked if ftype in ftypes else Qt.Unchecked)
if self.creating_snippet: if self.creating_snippet and not ftypes:
self.types.item(0).setCheckState(Qt.Checked) self.types.item(0).setCheckState(Qt.Checked)
(self.name if self.creating_snippet else self.template).setFocus(Qt.OtherFocusReason) (self.name if self.creating_snippet else self.template).setFocus(Qt.OtherFocusReason)