das-developers / das2java

The original das2 library. Provides interactive publication-ready 2-D plotting
https://das2.org
GNU Lesser General Public License v3.0
4 stars 0 forks source link

strange change in code prevents annotation drag renderers from painting #22

Closed jbfaden closed 2 years ago

jbfaden commented 2 years ago

Ali pointed out about a month ago that when the annotations are told to point at something, the drag renderer which shows the arrow during the drag doesn't draw. This is also the case for the move annotation mouse module. I was looking into this now, and I found that it's because getMouseDragEvent in ArrowDragRenderer returns null, when others return something here. Experimenting with this, I found that simply returning "new MouseDragEvent(source)" will allow it to work as I remember.

I found that v2020a_1 works fine, and v2021a_1 shows the bug. I will improve the resolution here shortly to isolate the change.

jbfaden commented 2 years ago

This shows how the arrow should be drawn during the drag: image

jbfaden commented 2 years ago

20200528a is okay, 20200605a shows the bug.

jbfaden commented 2 years ago

Mouse drag renderers must return a MouseDragEvent. Before was okay to return null, but appearently something else needed a tighter spec, and an error was thrown. See stderr output where messages about "dragRenderer isUpdatingDragSelection()==True, but no dragEvent was produced" are posted.

jbfaden commented 2 years ago

See also the bug in Autoplot https://sourceforge.net/p/autoplot/bugs/2400/