realthunder / FreeCAD

Link branch FreeCAD
Other
784 stars 45 forks source link

Shortcut for Sketch Polyline tangent, perpendicular etc styles with "M" not working (Daily 2022.111) #349

Open Miksu80 opened 2 years ago

Miksu80 commented 2 years ago

As description says, in sketch cycling polyline modes with "M" not working at all.

OS: Windows 10 Version 2009 Word size of FreeCAD: 64-bit Version: 2022.111.30764 (Git) Build type: Release Branch: LinkDaily Hash: ef3092bcbca5475eff4eb7ff7933eb3e9bbbe4b9 Python version: 3.8.6+ Qt version: 5.15.2 Coin version: 4.0.1 OCC version: 7.6.0 Locale: English/Finland (en_FI)

Rabbit-sk commented 2 years ago

I noticed that too. It works with G, M. Some shortcuts have changed in Sketcher.

QuakeString commented 2 years ago

yes, you can hover over the icon and it will show the key combination. this is the new thing. before it was M now it is G and M.

Miksu80 commented 2 years ago

New combo is not good with polyline because every time you're switching mode, you've got to press G, M -> from any direction polyline to perpendicular circle you've got to press: G,M,G,M,G,M,G,M,G,M from previous M,M,M,M,M. It'd be just fine if the polyline -tool selection would be G,M but to cycle the modes when in polyline it'd require only "M".

QuakeString commented 2 years ago

New combo is not good with polyline because every time you're switching mode, you've got to press G, M -> from any direction polyline to perpendicular circle you've got to press: G,M,G,M,G,M,G,M,G,M from previous M,M,M,M,M. It'd be just fine if the polyline -tool selection would be G,M but to cycle the modes when in polyline it'd require only "M".

Totally agreed. I believe dev. will take a notice.

Rabbit-sk commented 2 years ago

It'd be just fine if the polyline -tool selection would be G,M but to cycle the modes when in polyline it'd require only "M".

I agree with you. An important part of this proposal is:

to cycle the modes when in polyline it'd require only "M"

This is because there is a shortcut M, M that works with preselection, to display some possible actions with a given object. But when drawing a polyline, it is obvious that the user wants cycling between polyline modes, single pressing M in this mode should have higher priority than the shortcut M, M.

So the proposal we came up with is as follows:

realthunder commented 2 years ago

For those who are interested, the above commit introduces dynamic shortcut conflict resolving in FreeCAD. It can now perform longest key sequence match instead of Qt's default shortest match. In other word, Shortcut M and M, M can now coexist without any problem. I'll see if I can submit this to upstream and suggest Sketch to revert back the original shortcuts.

luzpaz commented 2 years ago

JFYI, upstream Feature Freeze is March 4th

raindropsfromsky commented 1 year ago

I am still facing this issue in June 2023: While drawing the polyline, pressing M terminates the polyline. (It does not cycle through the polyline modes.)

I tried to press G,M but that does not change the polyline mode. If I press the M key twice rapidly, it does not terminate the polyline; but it does not change the mode, either.

I am using realthunder/FreeCAD Linkbranch 2023.524.0.14555, Python 3.11.3, Qt 5.15.6, Coin 4.0.1, Vtk 9.2.5, OCC 7.7.1. My OS is Windows 11 Home.

I checked the hotkey settings, and they seem to be fine. image

The default value is M, and not G,M or M,M.

But then I have a doubt (please confirm): It seems that the GUI only allows us to change the shortcut for creating a new polyline. But it does NOT provide us with shortcuts to- (a) terminate the ongoing (current) polyline, or (b) Cycle through its mode

Or does it mean that when we press M, a new polyline is launched, which automatically terminates the current one? In any case, that still leaves the issue of not being able to cycle through the current polyline's modes at all.

dickshaydle commented 1 year ago

Thank you @raindropsfromsky. I also wanted to file that but. I can reproduce that on Linux mint and Arch. With the latest release (Tip 2023.05.21) and already version 2023.05.16, but not 2023.01.31.

'M' is supposed to cycle through the modes and not end the line.

blue0ceanby commented 1 year ago

as a workaround if you run it as shift M a switch is possible

raindropsfromsky commented 1 year ago

@blue0ceanby Thanks for the tip! SHFT+M does work, but it is difficult to press the SHFT+M combo with just one hand (our other hand is busy drawing the polyline). Therefore, it is desirable to have a single-key shortut for cycling through the six polyline modes..

Secondly, although the SHFT+M shortcut works, I did not find it listed in the Customize dialog. [BUG] Why is it hard-coded, and thus not editable?

dickshaydle commented 1 year ago

Something that was easy before turns into a hidden feature with Shift+M.

It was intuitive and simpler before to press the same key as the polyline tool itself.