diff --git a/gramps/gui/views/treemodels/citationbasemodel.py b/gramps/gui/views/treemodels/citationbasemodel.py index cc626fe1d..ed1464dbf 100644 --- a/gramps/gui/views/treemodels/citationbasemodel.py +++ b/gramps/gui/views/treemodels/citationbasemodel.py @@ -266,6 +266,18 @@ class CitationBaseModel: self.set_cached_value(source_handle, "SRC_CHAN", value) return value + def citation_src_sort_change(self, data): + source_handle = data[COLUMN_SOURCE] + cached, value = self.get_cached_value(source_handle, "SRC_CHAN") + if not cached: + try: + source = self.db.get_source_from_handle(source_handle) + value = "%012x" % source.change + except: + value = '' + self.set_cached_value(source_handle, "SRC_CHAN", value) + return value + # Fields access when 'data' is a Source def source_src_title(self, data): diff --git a/gramps/gui/views/treemodels/citationlistmodel.py b/gramps/gui/views/treemodels/citationlistmodel.py index a028509e1..4aec38d58 100644 --- a/gramps/gui/views/treemodels/citationlistmodel.py +++ b/gramps/gui/views/treemodels/citationlistmodel.py @@ -91,7 +91,7 @@ class CitationListModel(CitationBaseModel, FlatBaseModel): self.citation_src_abbr, self.citation_src_pinfo, self.citation_src_private, - self.citation_src_chan, + self.citation_src_sort_chan, self.citation_tag_color ] FlatBaseModel.__init__(self, db, uistate, scol, order, search=search,