From 308c23fcba8212bfb7e50710b3a306c4e78f2e47 Mon Sep 17 00:00:00 2001 From: Glutanimate Date: Wed, 25 Jul 2018 11:52:21 +0200 Subject: [PATCH] Make sure to end model reset when prematurely returning from toggleField Fixes an issue where Anki would stall after trying to remove the last browser column. --- aqt/browser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/aqt/browser.py b/aqt/browser.py index 7f0a8058a..c5709ef61 100644 --- a/aqt/browser.py +++ b/aqt/browser.py @@ -735,6 +735,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