Ticket #2256: listview.py.diff

File listview.py.diff, 729 bytes (added by Ratanak, 12 years ago)

Patch that properly updates ListStore indexes

  • deluge/ui/gtkui/listview.py

    diff --git a/deluge/ui/gtkui/listview.py b/deluge/ui/gtkui/listview.py
    index 204f09b..1bfec27 100644
    a b def remove_column(self, header):  
    472472        for column in self.columns.values():
    473473            if column.column_indices[0] > column_indices[0]:
    474474                # We need to shift this column_indices
    475                 for index in column.column_indices:
    476                     index = index - len(column_indices)
     475                for i, index in enumerate(column.column_indices):
     476                    column.column_indices[i] = index - len(column_indices)
    477477
    478478        # Remove from the liststore columns list
    479479        for index in column_indices: