Community
Participate
Working Groups
In the following use case, an inconsistent state can be produced where the selection observable holds an obsolete object: 1. A table is bound to a model (WriteableList) containing a number of objects 2. One object in this table is selected and an action is executed which accesses this selection (open selected object, for example) 3. Due to some action the objects in the table are reevaluated/reloaded/somehow changed. The WriteableList which is bound to the table ridget is updated and updateFromModel() is called on the table ridget. The table shows the right state of all objects. The selection is still visible. 4. If no new selection event occurs and an action is executed which accesses the selection, the old object from before the alteration of the model will be returned by tableRidget.getSelection(). As far as I understand it, there is an update of the selection state missing during the call of updateFromModel(). The workaround at the moment is to explicitly set the selection to a valid object or to a object not in the tables model thereby removing the selection.