PDA

View Full Version : [FIXED] Tree selection GXT 3.1.2



gorilla076
7 Apr 2016, 5:32 AM
I have added a selection change listener as:



tree.getSelectionModel().addSelectionChangedHandler(new SelectionChangedHandler<Node>() {
@Override
public void onSelectionChanged(SelectionChangedEvent<Node> event) {
// do something
}
});


and it gets fired twice for every selection change.

First from:

TreeSelectionModel::onMouseDown(MouseDownEvent event)

and again from:

TreeSelectionModel::onClick(ClickEvent event)

Is there a standard way to prevent the SelectionChangedEvent from firing multiple times for the same change?

branflake2267
7 May 2016, 1:10 PM
Thanks for the report! I have opened a bug in our bug tracker.

branflake2267
7 May 2016, 1:11 PM
I don't have any magic for preventing this second click since the issue is upstream in the api. An override could be done and maybe fixed if the issue was drilled a bit futher.