From 36779c12295e66dc741ab5e59c49f01ce132846f Mon Sep 17 00:00:00 2001 From: prculley Date: Thu, 4 Oct 2018 11:23:11 -0500 Subject: [PATCH] Fix View Column sizing so last column size setting is maintained Fixes #10800 --- gramps/gui/columnorder.py | 6 ++++-- gramps/gui/views/listview.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gramps/gui/columnorder.py b/gramps/gui/columnorder.py index 1f85b2ac9..a4be59fe7 100644 --- a/gramps/gui/columnorder.py +++ b/gramps/gui/columnorder.py @@ -143,8 +143,10 @@ class ColumnOrder(Gtk.Box): index = 0 for val, size in zip(self.oldorder, self.oldsize): if val in self.oldvis: - size = widths[index] - index += 1 + if val != self.oldvis[-1]: + # don't use last col width, its wrong + size = widths[index] + index += 1 colord.append((1, val, size)) else: colord.append((0, val, size)) diff --git a/gramps/gui/views/listview.py b/gramps/gui/views/listview.py index 1a84b4b6f..f9dabc9f4 100644 --- a/gramps/gui/views/listview.py +++ b/gramps/gui/views/listview.py @@ -1041,7 +1041,7 @@ class ListView(NavigationView): newsize = [] index = 0 for val, size in zip(order, size): - if val in vis: + if val in vis[:-1]: # don't use last column size, it's wrong if widths[index]: size = widths[index] index += 1