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
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))

View File

@ -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