kasemir / org.csstudio.display.builder

Update of org.csstudio.opibuilder.*
Eclipse Public License 1.0
2 stars 10 forks source link

Spinner and ScrollBar continue to increment/decrement when context menu is open #498

Closed claudio-rosati closed 5 years ago

claudio-rosati commented 5 years ago

The previous fixes (commits 39df057fee968116bbbcf445541225ab7c03de60 and b4bfc9e047f6880c237180cdac1c9ae6d4f4cc0a) didn't solve the original issue opened by our users. Moreover the same problem is suffered by the ScrollBar widget

The following cases still exists (based on Spinner but equally working for ScrollBar):

Case # 1

Until both mouse buttons are released, the spinner continues spinning. Context menu items can be selected too.

Case # 2

From this point on the spinner continues to spin forever, even after the context menu is closed. To stop spinning, a spinner's button must be clicked.

Case # 3

The same happens for the ScrollBar widget's buttons and track.

Proposed Solution

Spinning must be interrupted as soon as the mouse leaves the spinner/scrollbar boundary. Context menu cannot be opened inside the (spinner/scrollbar)'s buttons and scrollbar's track area.

claudio-rosati commented 5 years ago

@kasemir I'm not sure if what I've done has to be ported in the Phoebus version too. Please give it a try first.

kasemir commented 5 years ago

Hmm, what a nuisance.

Good news is that I see no problem with Phoebus/pure JFX. Only happens with SWT context menus.

The way you have it now, there's no longer any way to open the context menu on a scrollbar or spinner. Would it be possible to only suppress the context menu once the primary button has been pressed? Otherwise, still allow the context menu?

claudio-rosati commented 5 years ago

In the scrollbar it is possible to open it right-clicking on the thumb.

Would it be possible to only suppress the context menu once the primary button has been pressed?

No because of Case # 3

I'm investigating how to suppress the native (i.e. JavaFX) context menu in order to have the SWT one opening on the text area of the Spinner.