Selecting Overlapping Lines

Please use this forum to post feedback and suggestions related to QCAD.

Moderator: andrew

Post Reply
jby601
Junior Member
Posts: 13
Joined: Tue Dec 13, 2011 10:27 pm

Selecting Overlapping Lines

Post by jby601 » Sat Dec 24, 2022 1:19 pm

OS: Linux, Mint 20 Cinnamon 4.6.7. QCAD 3.27.8

An observation:

In: https://www.qcad.ch/rsforum/viewtopic.php?t=3944, Andrew implied that Alt-click would bring up a context menu to allow selection of overlapping lines. In practice, I find it necessary to do Ctrl-Alt-click. This leads to a further small problem: to select multiple segments it is necessary to hold down the <Shift>, <Ctrl> and <Alt> at the same time (a slow operation on my standard keyboard) in order to choose the next overlapping segment.

If an improvement were possible I'd love to see repeated 'Alt-click'-ing cycle through selecting the various overlapping lines.

CVH
Premier Member
Posts: 3468
Joined: Wed Sep 27, 2017 4:17 pm

Re: Selecting Overlapping Lines

Post by CVH » Sat Dec 24, 2022 3:41 pm

jby601 wrote:
Sat Dec 24, 2022 1:19 pm
In practice, I find it necessary to do Ctrl-Alt-click.
In EAction.getEntityId the Alt key differentiates between one entity ID or one ID out a list of candidates.
Standard implemented since the 3.12.7 release Jan. 2016.
The code provides for opting out of this behavior but that is not listed (anymore) under the Graphics View Preferences.

On Windows there is no difference between Alt+Click and Ctrl+Alt+Click, the Ctrl key is probably ignored here.
On Windows Ctrl+Click does nothing, Shift+Click adds to (or subtracts from) the selection.

And thus Shift+Alt+Click lets us select from a list which to add to (or subtracts from) the selection.
If there are no multiple candidates to choose from then Shift+Alt+Click does the same as Shift+Click.

I see no need to hold down the <Shift>, <Ctrl> and <Alt> at the same time.

Maybe you could make a selection in the opposite way.
Select a small rectangular region from left to right to select all inside and crossing and then Shift+Click to deselect those to keep. :wink:

Regards,
CVH

User avatar
Husky
Moderator/Drawing Help/Testing
Posts: 4939
Joined: Wed May 11, 2011 9:25 am
Location: USA

Re: Selecting Overlapping Lines

Post by Husky » Sat Dec 24, 2022 8:14 pm

Hi jby601,
jby601 wrote:
Sat Dec 24, 2022 1:19 pm
In practice, I find it necessary to do Ctrl-Alt-click. This leads to a further small problem: to select multiple segments it is necessary to hold down the <Shift>, <Ctrl> and <Alt> at the same time (a slow operation on my standard keyboard) in order to choose the next overlapping segment.
CTRL+SHIFT+ALT is not recognized in QCAD = effectless. :(

However - good praxis would be to avoid overlapping entities in CAD but as we know ... it will happen in certain situation.
If you have to face those situation there are different approaches to solve the issue - in your case I don't think that ALT+CLICK is the best choice.

I prepared a test dxf. In this file are 10 overlapping lines with different lengths. Let assume I need only the line with the 55.25 lengths. I can get rid of the 9 other lines in one task.

Who ever is reading this topic - try it yourself and please share how the task can be accomplished.

10 line stack.dxf
(102.79 KiB) Downloaded 256 times
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."

jby601
Junior Member
Posts: 13
Joined: Tue Dec 13, 2011 10:27 pm

Re: Selecting Overlapping Lines

Post by jby601 » Sat Dec 24, 2022 8:25 pm

@CVH - thank you for this information. You say that under Windows that there is no difference between Alt+Click and Ctrl+Alt+Click.
I would like to get my Linux installation to also ignore the need for the Ctrl key so that it is sufficient to do Alt+Click to bring up the little context menu; is there any way to configure this?

@Husky - I would not use overlapping lines in my own work, but when I receive drawings from others they are not so careful!

CVH
Premier Member
Posts: 3468
Joined: Wed Sep 27, 2017 4:17 pm

Re: Selecting Overlapping Lines

Post by CVH » Sun Dec 25, 2022 10:56 am

jby601 wrote:
Sat Dec 24, 2022 8:25 pm
I would like to get my Linux installation to also ignore the need for the Ctrl key so that it is sufficient to do Alt+Click to bring up the little context menu; is there any way to configure this?
Not that I am aware of. :oops:

As mentioned I even checked it in the current code of EAction what is open source:
https://github.com/qcad/qcad/blob/maste ... n.js#L2090
There is stated that it returns:
... Entity ID under the mouse cursor.
User may choose between multiple candidates if result is ambiguous and Alt key is pressed.

Just as expected. :wink:

The code then continues here:
https://github.com/qcad/qcad/blob/maste ... n.js#L2114
Line 2123-2131 are executed when ALT was not pressed.
The rest until line 2221 populates an "EntityContextMenu" up to 20 items and shows it.
2 Reactors are set in place to handle hovering and selection.

isAltPressed() is a Library function:
https://github.com/qcad/qcad/blob/2215d ... y.js#L3175
getKeyboardModifiers() is also a Library function:
https://github.com/qcad/qcad/blob/2215d ... y.js#L3152
Nothing extraordinary there, the last updates to these are 4 years old.


Bottom line: What you describe is not standard behavior.
It could be keyboard or OS related.
It could be a bug for Linux or just your version or it could be Qt related.

I would file a bugreport:
https://www.ribbonsoft.com/bugtracker/
You need to make a separate account there. :wink:

Regards,
CVH

jby601
Junior Member
Posts: 13
Joined: Tue Dec 13, 2011 10:27 pm

Re: Selecting Overlapping Lines

Post by jby601 » Sun Dec 25, 2022 1:13 pm

@CVH Many thanks. I will file a bug report.

Post Reply

Return to “QCAD Suggestions and Feedback”