Setting editable should not recreate the treeview in DictionaryGrid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Quickly Widgets |
Fix Released
|
Undecided
|
Unassigned | ||
quickly-widgets (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When you set mydictgrid.editable = True, then the widget is refreshed. This has several negative side effects:
1) if you've scrolled to a specific row, then that is forgotten, which is a bad thing. Consider an application with lots of rows that are normally not edited. You have a toggle button on the toolbar to make the treeview editable when that's necessary. So you've scrolled to a row and want to edit it. After making the table editable, you'll have to scroll back to the row in order to edit it. Then you untoggle editable, and then selection and scroll position is again forgotten.
2) If you've set column titles, then those are forgotten if you toggle editable.
I think a much better solution would be to make the editable setter loop through the columns, setting the editable property for each. That wouldn't disrupt anything. It's a little more work though.
Related branches
- Rick Spencer: Approve
-
Diff: 35 lines (+6/-1)2 files modifiedquickly/widgets/dictionary_grid.py (+1/-1)
quickly/widgets/grid_column.py (+5/-0)
Changed in quidgets: | |
status: | New → Fix Released |
Changed in quidgets: | |
milestone: | none → 12.03 |
status: | Fix Released → Fix Committed |
Changed in quidgets: | |
status: | Fix Committed → Fix Released |
This will be easily fixed once grid_column gets an editable property: https:/ /bugs.launchpad .net/quidgets/ +bug/812293