DiscussionsIssue archiveOCCT:Application Framework

Archived issue #0033872

Double click not recognized after a long first click

CommunityOCCT:Application Frameworknew3 public notes

Search issues

Description

Currently, in the AIS_ViewController, we have the method UpdateMouseButtons (AIS/Attachment 3 (CXX):712)

Inside it, the library increment the index by one each time we trigger a mouse button, we increment a counter by one. And this counter is only reset when the mouse click is detected as a double click. Which happen only if the counter is 2 and the timer is not elapsed.

Now, we have a problem : when the user click on the view, don't release the button for a long period of time (~200ms), don't move the mouse, than release the button, we cannot receive any double click anymore : the counter has been raised to higher than 2, and therefore cannot go back to 0 as we don't detect any double clicks.

We propose to change this by editing the function as proposed in the attached files.

Steps to reproduce

Bug generation :
1) Press any mouse button received by the AIS_ViewController on the view (Let's say the right click for this exemple)
2) Don't release the button, do not move it, for longer than the duration of the double click
3) Once this duration is passed, release the mouse button
4) Try to double click - It shouldn't be detected

Additional information

I added comment inside the corrected code, just to be sure that i explained the modification correctly.

If i am not clear, don't fear to ask me for more informations =)

Public activity

3 archived notes

Participants are labeled by their role within this record.

01Author
I just saw that i didn't send the correct version of the corrected file, please read the one linked in this message instead
Attachment 1 (CXX) (121,267 bytes)   
02Commenter 2
Dear Commenter 3 the main issue tracker going to be GitHub issue for community and Jira for clients.
If it is possible, could you please create issue on GH? https://github.com/Open-Cascade-SAS/OCCT/issues
If not - then when the issue is moved to "in progress" we will create a copy manually. And notify you here
03Author
I created the issue on GitHub, at this link :
https://github.com/Open-Cascade-SAS/OCCT/issues/356


Hope it's correctly composed =)