thatone
25 Mar 2009, 3:06 PM
If a model in a ListStore is updated (ListStore.update(model)), the List of selected models in AbstractStoreSelectionModel is not updated to reflected this change. It retains a reference to the old model. storeListener only listens for storeAdd, storeClear, and storeRemove. storeUpdate should trigger a swap of the old model with the new model.
i.e.
protected void onUpdate(final M model) {
if (locked) {
return;
}
if (isSelected(model)) {
int row = selected.indexOf(model);
if (row >= 0) {
selected.remove(row);
selected.add(row, model);
fireSelectionChange();
}
}
}
i.e.
protected void onUpdate(final M model) {
if (locked) {
return;
}
if (isSelected(model)) {
int row = selected.indexOf(model);
if (row >= 0) {
selected.remove(row);
selected.add(row, model);
fireSelectionChange();
}
}
}