Chosing a Layer for Editing Should Unlock It

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

Moderator: andrew

Post Reply
User avatar
Chips&Chips
Full Member
Posts: 85
Joined: Mon Nov 13, 2023 12:15 pm

Chosing a Layer for Editing Should Unlock It

Post by Chips&Chips » Mon Sep 09, 2024 7:08 am

I saw another suggestion about this and an answer that involved Layer States. My suggestion is simpler:

When a locked layer is chosen for editing, it should also unlock with no further actions/clicks.

I can not see any reason why a layer that I want to edit should be locked! I get caught by this over and over. It's a real time waster.
Paul A.
SE Texas
Windows 10
QCAD V 3.32.0.0

User avatar
andrew
Site Admin
Posts: 8782
Joined: Fri Mar 30, 2007 6:07 am

Re: Chosing a Layer for Editing Should Unlock It

Post by andrew » Mon Sep 09, 2024 10:51 am

You can edit a locked layer (e.g. change its name, attributes, visibility, hierarchy, ...).

The entities on a layer cannot be selected or modified. This is by design. Unlocking a layer as soon as a user tries to draw on it would defeat the purpose of the layer locking mechanism as this is meant to prevent exactly this.

May I ask why you lock layers at all in the first place if you still want to be able to draw on them?

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

Re: Chosing a Layer for Editing Should Unlock It

Post by CVH » Mon Sep 09, 2024 3:36 pm

Andrew,

If you right-click on a layer in the Layer List it is also set current.
An 'Unlock Layer' feature in the context list would set it as current and unlock only that layer.

It would still require 2 clicks ...
Ensuring that you don't accidentally unlock the layer with setting it as current. :wink:

Then I have an issue with (De-)Select Layer Entities (Y+/-).
Keyboard shortcuts Y+ or Y- won't work when drawing.
You need to use the Layer Toolbar or the Layer menu button or select it from the context list.
If your Layer list is short then you can right-click in the void space.
But when fully populated then the right-click will set the nearest indicated layer as current.
Adversely the intention was (de-)selecting all entities of the layer that was currently active.
And not also setting it current in the process.

Regards,
CVH

User avatar
Chips&Chips
Full Member
Posts: 85
Joined: Mon Nov 13, 2023 12:15 pm

Re: Chosing a Layer for Editing Should Unlock It

Post by Chips&Chips » Tue Jun 10, 2025 2:15 pm

Sorry I did not get back to this sooner. When I said "chosen for editing" I seem to have made a poor choice of words. I actually meant "made active".

So my suggestion is, "When a locked layer is MADE ACTIVE, it should also unlock with no further actions/clicks."


Andrew asked, "May I ask why you lock layers at all in the first place if you still want to be able to draw on them?"

Lets say I am designing something that has multiple parts. And I am using different layers for each part. I also want to use different colors for each part so I can easily keep them separate while I draw.

I start with part A and go as far as I can. But I need to at least begin part B to determine some feature(s) of it before I can proceed any further with part A. Now, this is where QCAD out-shines my previous 2D CAD program by a lot. I can jump to part B and work on it without worrying about changing the color if I simply change the layer. I may use a layer for construction lines that are not part of the final design. I may use a layer for standard hardware that can be purchased instead of being manufactured.

If I have ten or fifteen parts I can turn them on and off as I need to see them while working on the current part/layer. In the past, with other CAD programs, I have had to change both the active layer and the color every time I switch from one part to another. It is not hard to discover that I spent an hour or two adding features to the wrong layer. Then I must spend more time moving them to the desired layer so they are part of the correct part. So I want to lock a layer to prevent inadvertently adding changes to the wrong layer, to the wrong part.

As I said, this is one area where QCAD if better. But what I can not see is why I would make a layer the current one and have it remain locked.


CVH,

Yes, if I right click on a layer in the list it is set current, but I also get a drop down menu so I had not noticed that. Then I must get rid of the drop down menu (click 2) and it is still locked so click 3. Not much help there.

I do not at all understand what you are saying about Y+ and Y-. This is probably because I have not used them. I can't even find them in the menus; where are they?
Paul A.
SE Texas
Windows 10
QCAD V 3.32.0.0

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

Re: Chosing a Layer for Editing Should Unlock It

Post by CVH » Tue Jun 10, 2025 3:29 pm

Hi,
The first part of your reply sounds like you are organizing (grouping) geometry in layers.

Common practice:
Blocks are intended to group geometry, layers are intended to control the attributes of entities that live on it.
Block are a collection of entities, the entity layer specifies if and how they are displayed/printed.

But I do basically the same. :wink:
Simply because layers have more attribute states beside showing or not for the Block (definition) ... For all related Block References.
And there is the general advice to avoid so called 'massive Blocks' with QCAD.
I call it a 'hybrid method'.
- Top parent layer as per geometry, typically empty apart from some content, the layer 0 in regards of Blocks if you like.
- Child layers as per common practice to control entities attributes.

A specific geometry can then be: hidden, locked, frozen, snappable, plottable, all but the first inherited downwards.
Chips&Chips wrote:
Tue Jun 10, 2025 2:15 pm
CVH,

Yes, if I right click on a layer in the list it is set current, but I also get a drop down menu so I had not noticed that. Then I must get rid of the drop down menu (click 2) and it is still locked so click 3. Not much help there.
CVH wrote:
Mon Sep 09, 2024 3:36 pm
An 'Unlock Layer' feature in the context list would set it as current and unlock only that layer.
In the sense of: If that would be implemented in the context menu.
Toggle visibility of active is listed (YV) in the context menu, toggle locked nature of active is not.
A 2-click is required to not accidentally unlock the layer with setting it as current.
For example with:
- Select > Edit Layer (YE) or on right-click and opting for Edit Layer (To change color e.g.)
- Select > Add SubLayer (YU) or on right-click and opting for Add SubLayer.
Chips&Chips wrote:
Tue Jun 10, 2025 2:15 pm
I can't even find them (Y+, Y-) in the menus; where are they?
Deprecated meanwhile, replaced by: YC, YD.
See Commit f20135d (Nov 23, 2022), FS#2413


Try in this order:
- Change selected layer by clicking on it in the Layer List.
- Type shortcut YC or YD.
Nothing is added to or removed from an existent selection.

Changing the current layer followed by YC or YD of the Layer menu works.
The same when selected with a right-click and opt for YC or YD in the context menu.
Or when the related button is clicked on the Layer Toolbar (If showing).

I suspect a focus issue, with the focus in the Layer List widget shortcut key sequences are not interpreted.

Regards,
CVH

Post Reply

Return to “QCAD Suggestions and Feedback”