#2256: Indexes aren't updated properly when removing columns
---------------------+------------------------------------------------------
 Reporter:  Ratanak  |       Owner:       
     Type:  patch    |      Status:  new  
 Priority:  minor    |   Milestone:  1.3.x
Component:  gtkui    |     Version:  1.3.5
 Keywords:           |  
---------------------+------------------------------------------------------

Comment(by Ratanak):

 Fixing the {{{ListStore}}} indexes revealed a deeper issue that better
 explains why plugin columns were rendering other plugins' column data. It
 turns out that the {{{TreeViewColumn}}} also needs updating.

 When a {{{TreeViewColumn}}} is created, its {{{CellRenderer}}} is given a
 fixed {{{ListStore}}} column number. Later, when that column number
 changes (when a column is removed), the {{{CellRenderer}}} continues to
 use the old column index. For example:

  There are two plugins that add columns to the view. After the new
 {{{ListStore}}} is created with the additional columns, its length is now
 29 (indexes 0-28). The plugin "One" indexes a {{{ListStore}}} position 27
 and the plugin "Two" indexes position 28. Their respective
 {{{TreeViewColumn}}} are given those indexes when they are created.

  Now, plugin "One" is disabled and the column is removed. A new
 {{{ListStore}}} is created with the column removed and now its length is
 28 (indexes 0-27). With the first patch I posted, plugin "Two" now indexes
 position 27 in the {{{ListStore}}} while its {{{TreeViewColumn}}} is still
 set to position 28 (without the first patch, it still indexes position
 28). This causes it to not render any cell data because it is out of the
 {{{ListStore}}} index range.

  Re-enabling "One" will cause the {{{ListStore}}} to change back to length
 29 (indexes 0-28) with plugin "One" indexing the appended column, position
 28. And so, data that is supposed to appear in plugin "One"'s column also
 appears in plugin "Two"'s column.

 I have added another patch that should resolve the {{{TreeViewColumn}}}
 index not being updated.

-- 
Ticket URL: <http://dev.deluge-torrent.org/ticket/2256#comment:1>
Deluge <http://deluge-torrent.org/>
Deluge project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-dev?hl=en.

Reply via email to