This looks like a UI bug. I can reproduce it in version 19.3 20 and latest. In 2 different win PCs. The bug is related to mouse click speed setting. For the fastest and second fastest setting it does not work, for slower ones it seems ok. Some other parts of Freecad handle double click correctly. It is possible that some code is trying to measure the delay and doing it badly instead of relaying on system events. Unfortunately mouse setting is not app specific so I can not have specific setting just for Freecad as workaroud. For now I do triple click which acts as double click should, but it is not convenient and makes me wonder which other pars of UI are broken like this.
I fond an old post with similar issue in Linux, but they never realized it was dependent on the mouse setting and it was not solved.
It is easy to reproduce. Change click speed and try edit the size by double click.
double click event does not open constran value edit dialog in scatch
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
-
- Posts: 2
- Joined: Tue Aug 16, 2022 10:45 am
double click event does not open constran value edit dialog in scatch
- Attachments
-
- New0001.png (4.83 KiB) Viewed 606 times
-
- New0000.png (21.02 KiB) Viewed 606 times
Re: double click event does not open constran value edit dialog in scatch
Hi and welcome to the forum!
Please describe what happens and what you expect.
Please describe what happens and what you expect.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: double click event does not open constran value edit dialog in scatch
Following the requests in the red box at the top of the page is critical for this topic. Open FreeCAD and select Help >> About. Copy to your clipboard and paste here.
The behavior of double-click is completely controlled by Qt, a key library for FreeCAD. The behavior is different for Windows, Mac, and Linux.
Qt should follow the OS choice for click speed in Windows and Mac, but the interval is fixed for Linux.
Gene
Re: double click event does not open constran value edit dialog in scatch
I'm sorry I have to tell it's wrong, only in this specific case : https://github.com/FreeCAD/FreeCAD/blob ... h.cpp#L684
Double-click time is, in this case, measured internally by FreeCAD.
However, the code is correct and the problem isn't due to some basic error in the implementation.
The maximum double-click speed (minimum time) setting in Windows corresponds to 200 ms. This is rather short. While a human (in good conditions) should be able to double-click around 100~125 ms, then if you consider things that may happen to events in the OS+mouse driver, then in the runtime env (Qt) then in the applicative libs (Coin, Quarter) then finally in the application, at the end it could be a hardly reachable value.
I probed the code and, with a rather good computer, I can reach a time at application level of around 175~195 ms, but it's not rare that the value can be in the 201~225 ms range. Hence with a setting @200 ms, it won't trigger a double-click.
I guess that with a computer lacking power or being loaded, it could become the case every time.
I also observed that when doing a triple-click, the time (at application level) seems shorter between click 2 & 3 than between 1 & 2. I have no clue where it may come from (BKAC, OS/driver, runtime env ???) but it may explain why OP can get the "double-click" behavior by doing a triple-click, because timing between clicks 2 & 3 matches the expected value.
I don't know what could be a solution, and I'm actually not sure ATM that something needs to be done. Sometime we have to bet on the user to use reasonable settings.