diff --git a/gramps/gui/displaystate.py b/gramps/gui/displaystate.py index 65823ed4a..462b3c256 100644 --- a/gramps/gui/displaystate.py +++ b/gramps/gui/displaystate.py @@ -538,7 +538,11 @@ class DisplayState(Callback): self.window.get_window().set_cursor(self.BUSY_CURSOR) else: self.window.get_window().set_cursor(self.cursor) - process_pending_events() + if self.window.get_window().is_visible(): + #avoid critical gdk error: + #Gdk-CRITICAL **: gdk_error_trap_pop_internal: assertion `trap != NULL' failed + #only process events if window is actually visible + process_pending_events() def set_open_widget(self, widget): self.widget = widget diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py index ed8b390e2..2eb3ff719 100644 --- a/gramps/gui/views/listview.py +++ b/gramps/gui/views/listview.py @@ -285,7 +285,11 @@ class ListView(NavigationView): function because we don't want to set the color of untagged rows. ''' fg_color = model.get_value(iter_, model.color_column()) - renderer.set_property('foreground', fg_color) + #for color errors, typically color column is badly set + if fg_color: + renderer.set_property('foreground', fg_color) + else: + _LOG.debug('Bad color set: ' + str(fg_color)) def set_active(self): """ diff --git a/gramps/gui/views/treemodels/treebasemodel.py b/gramps/gui/views/treemodels/treebasemodel.py index 39745c335..343ef9807 100644 --- a/gramps/gui/views/treemodels/treebasemodel.py +++ b/gramps/gui/views/treemodels/treebasemodel.py @@ -452,7 +452,7 @@ class TreeBaseModel(GObject.GObject, Gtk.TreeModel): if search[1]: # we have search[1] = (index, text_unicode, inversion) col, text, inv = search[1] - func = lambda x: self._get_value(x, col) or "" + func = lambda x: self._get_value(x, col, store_cache=False) or "" if search[2]: self.search = ExactSearchFilter(func, text, inv) else: @@ -912,7 +912,7 @@ class TreeBaseModel(GObject.GObject, Gtk.TreeModel): else: return val - def _get_value(self, handle, col, secondary=False): + def _get_value(self, handle, col, secondary=False, store_cache=True): """ Returns the contents of a given column of a gramps object """ @@ -923,7 +923,7 @@ class TreeBaseModel(GObject.GObject, Gtk.TreeModel): data = self.map(handle) else: data = self.map2(handle) - if not self._in_build: + if not self._in_build and store_cache: self.lru_data[handle] = data try: