Fix View Column sizing so last column size setting is maintained

Fixes #10800
This commit is contained in:
prculley 2018-10-04 11:23:11 -05:00 committed by Nick Hall
parent 5b7f5164db
commit 36779c1229
2 changed files with 5 additions and 3 deletions

View File

@ -143,8 +143,10 @@ class ColumnOrder(Gtk.Box):
index = 0 index = 0
for val, size in zip(self.oldorder, self.oldsize): for val, size in zip(self.oldorder, self.oldsize):
if val in self.oldvis: if val in self.oldvis:
size = widths[index] if val != self.oldvis[-1]:
index += 1 # don't use last col width, its wrong
size = widths[index]
index += 1
colord.append((1, val, size)) colord.append((1, val, size))
else: else:
colord.append((0, val, size)) colord.append((0, val, size))

View File

@ -1041,7 +1041,7 @@ class ListView(NavigationView):
newsize = [] newsize = []
index = 0 index = 0
for val, size in zip(order, size): 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]: if widths[index]:
size = widths[index] size = widths[index]
index += 1 index += 1