Merge pull request #244 from glutanimate/fix-togglefield-reset

Make sure to end model reset when prematurely returning from toggleField
This commit is contained in:
Damien Elmes 2018-07-26 16:25:01 +10:00 committed by GitHub
commit 5f9a8f7960
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -736,6 +736,7 @@ by clicking on one on the left."""))
self.model.beginReset()
if type in self.model.activeCols:
if len(self.model.activeCols) < 2:
self.model.endReset()
return showInfo(_("You must have at least one column."))
self.model.activeCols.remove(type)
adding=False