edited-handlers in CouchGrid should be moved to DictionaryGrid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Quickly Widgets |
New
|
Undecided
|
Unassigned |
Bug Description
CouchGrid has some edited-handlers which stores values to the database under certain circumstances. For instance, a CheckColumn is saved immediately when toggled, which makes sense. But I think these should be moved to DictionaryGrid. There might be reasons why DictionaryGrid itself would want to react to changes, but it would likely also help clean up the code in CouchGrid. For instance, CouchGrid _refresh_treeview connects signal handlers for the special-cased CheckColumn. This doesn't feel right.
It's not unlikely that we'll add more columns of this type later. For instance a StringListColumn that would display a ComboBox with the list entries. Whenever that's changed, it should be saved immediately, just like CheckColumn. This which would mean adding further "cruft" to CouchGrid.
We should find a more general way to handle this and do it in DictionaryGrid. Then, CouchGrid can just focus on the database functionality and not on connecting signal handlers for columns that are also useful in DictionaryGrid.