Open backwindj opened 5 years ago
@backwindj, come over the community edition of WorldWind and we'll try to debug it there. You can open the issue there and we'll try and trace this bug.
OK, I will. I am on vacation for now. François
Le 13 juillet 2019 19:22:26 GMT+02:00, Wiehann Matthysen notifications@github.com a écrit :
@backwindj, come over the community edition of WorldWind and we'll try to debug it there. You can open the issue there and we'll try and trace this bug.
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/NASAWorldWind/WorldWindJava/issues/162#issuecomment-511139419
-- Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
Description
Rollover events may be sent infinitely to a selectListener in presence of many paths.
Steps to Reproduce
Expected behavior: The currently rolled over path shall be returned only once or at a human rate
Actual behavior: I have seen two behaviors:
Operating System and Version
seen on Linux Fedora 29 with WorldWindJava 2.1.0
Additional Information
Here is the listener I am using:
private final SelectListener selection_listener = new SelectListener () { @Override public void selected (final SelectEvent event) { if (event.isRollover ()) { final Object object = event.getTopObject ();
};
private void show (final Path path, final Point point) { final String text = path.getStringValue (AVKey.DISPLAY_NAME);
}
Somewhere in the code, the listener is registered like this: world.addSelectListener (selection_listener);
Sometimes, i get a repeated stream of creates & deletes, sometimes a repeated stream of updates.
I have also tried to get it working with Hover events and I did get a nice working solution. I would prefer my solution to be more responsive and therefore, it needs to listen to Rollover events.
Here is the listener with Hover events: private final SelectListener selection_listener = new SelectListener () { @Override public void selected (final SelectEvent event) { if (event.isHover ()) { final Object object = event.getTopObject ();
};
Thanks for your time.