From 9230de61be36ff42ea2991550e8a9600b3867668 Mon Sep 17 00:00:00 2001 From: prculley Date: Thu, 7 May 2020 09:39:09 -0500 Subject: [PATCH] Fix Verify tool bug caused by bad change in GObject introspection Fixes: #11708 --- gramps/plugins/tool/verify.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/gramps/plugins/tool/verify.py b/gramps/plugins/tool/verify.py index d5d8af1c0..27b55de68 100644 --- a/gramps/plugins/tool/verify.py +++ b/gramps/plugins/tool/verify.py @@ -662,18 +662,19 @@ class VerifyResults(ManagedWindow): self.closeall() def hide_toggled(self, button): + self.filt_model = self.real_model.filter_new() if button.get_active(): button.set_label(_("_Show all")) - self.filt_model = self.real_model.filter_new() self.filt_model.set_visible_column(VerifyResults.SHOW_COL) - self.sort_model = self.filt_model.sort_new_with_model() - self.warn_tree.set_model(self.sort_model) else: - self.filt_model = self.real_model.filter_new() - self.filt_model.set_visible_column(VerifyResults.TRUE_COL) - self.sort_model = self.filt_model.sort_new_with_model() - self.warn_tree.set_model(self.sort_model) button.set_label(_("_Hide marked")) + self.filt_model.set_visible_column(VerifyResults.TRUE_COL) + if hasattr(self.filt_model, "sort_new_with_model"): + self.sort_model = self.filt_model.sort_new_with_model() + else: + self.sort_model = Gtk.TreeModelSort.new_with_model( + self.filt_model) + self.warn_tree.set_model(self.sort_model) def selection_toggled(self, cell, path_string): sort_path = tuple(map(int, path_string.split(':')))