Checked items are not dirt
Added by Vincenzo Romano over 13 years ago
In order to catch check box events I've attached an event listener to a WStandardItemModel::itemChanged() signal.
Those items only have the checkbox, no other contents.
Surprisingly, if I check the box I won't get the item flag "ItemIsDirty" set. It remains clear.
Maybe I'm wrong, but that flag should be set in case the CheckState changes.
Replies (3)
RE: Checked items are not dirt - Added by Koen Deforche over 13 years ago
Hey Vincenzo,
Ooops: the ItemIsDirty flag is in fact not used at all. I guess it was added while implementing the WBatchEditProxyModel but then we changed our mind to have a more flexible "dirty" indicator.
But perhaps it would be useful to define that it is used by a view whenever the user modifies a particular model index. I guess this is how you expect it to behave ?
Regards,
koen
RE: Checked items are not dirt - Added by Vincenzo Romano over 13 years ago
Exact. Whenever any Role is changed (at least by the library), the item's dirty flag is set.
Then it'd be the user's duty to clear it.