Sorting table breaks proper insert of new rows
Bug #1515079 reported by
Lisa Ruby
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zim |
Fix Committed
|
Medium
|
Unassigned |
Bug Description
I am seeing this issue in the Windows 0.63 version of Zim-Wiki. While editing a table, clicking the arrows to sort by any of the columns seems to break proper inserting of new rows. I have a table with two columns and multiple rows. When I try to insert a new row into a table after clicking the sort arrows, the new row always gets inserted at the top of the table and cannot be moved down. Closing and reopening Zim-Wiki resolves the problem.
Changed in zim: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in zim: | |
status: | Confirmed → Fix Committed |
To post a comment you must log in.
I want to add some points.
This happens in Zim 0.65 too. To insert new rows or change their position are used functions like 'swap', 'insert_after' in 'tableeditor.py'. In pyGTK docs it is written about these functions: “Note that this method only works with unsorted stores.” And: “Once a sort column ID has been set on a gtk.TreeModel implementing the gtk.TreeSortable interface it cannot be returned to the original unsorted state.” So it seems that if sorting remains as is than other approaches should be used to change position of rows.
Currently a workaround is reloading a page with tables (via pressing Ctrl-R, or moving to any other page and then coming back), after that it is again possible to change row position until sorting is pressed.