graphx icon indicating copy to clipboard operation
graphx copied to clipboard

Time out for double clicks is handled incorrectly.

Open JohnDeptuch opened this issue 1 year ago • 1 comments

I found that the handler set using onMouseDoubleClick is always called when a GShape object is clicked on twice using a mouse even if the time between clicks is several seconds. The cause is due to the value of MouseInputData.time being in seconds while the value of MouseInputData.doubleClickTime is in milliseconds. The comparison at line 949 in display_object.dart ends up using an interval of 250 seconds as a result and always succeeds.

Changing line 9 in pointer_data.dart so that the value of doubleClickTime is in seconds fixed the issue for me:

static double doubleClickTime = 0.250;

JohnDeptuch avatar Feb 02 '24 23:02 JohnDeptuch

Thank you so much for finding the bug and providing a solution @JohnDeptuch. Will try to merge the change soon.

roipeker avatar Feb 03 '24 21:02 roipeker