(Hoping this forum soon becomes popular enough with LibreCAD users to get some real feedback on usage topics like this).
I added a layer control feature in my own copy that is a very big help to the way I use LibreCAD.
I don’t know whether others use layers this way, so I don’t know whether this deserves a feature request at GitHub.
I have a layer that is normally visible and locked and almost never has reason to be active or unlocked.
I have three other layers, and most of the time I am working on one of those three and that is the only one of the three that should be visible and it should also be active.
But I often switch which one of those three I am working on, a step that before my code change was 3 clicks and error prone (accidentally made the locked layer active when I misclicked, then I would do edits unable to see that because the wrong layer was active, the edits were wrong).
Due to a recent change in 2.2.2 clicking to activate a layer that is not visible did nothing. IIUC, no sequence gets you to the usually wrong, but occasionally useful, state of having a layer active but not visible. That is a separate feature I hope to add later. I agree it should not have been easy to accidentally get there. But there should be some more explicit way to get there.
All the above was just context, not my feature. My feature is:
If you click to activate a layer that is not visible, it makes that layer visible, but also: if the layer that was active wasn’t locked, it makes that other layer invisible.
That gives me a one click (non error prone) place to switch the layer I’m working on. It makes the target layer both visible and active while making the previous layer I was working on invisible.
Rarely I want to see two of those (normally mutually exclusive) layers at once. That remains easy to do, by selecting first the layer I want active and then the visibility of the other layer I want to see (often I want to temporarily lock that other layer at that same time).
I’m still learning my way around the code, so this trivial change was hard. I didn’t (actually still don’t) understand the reason and structure for the event of clicking (in the tree widget) to activate a layer being such a different flow from the event of clicking to toggle the visibility.
The change I wanted was obvious and trivial in RS_LayerList::activate taking about 0% of my total effort. But because I don’t understand the reason those events are handled so differently, I was very slow to figure out that the malfunction was due to failing to call RS_Graphic::refreshLayerVisibility() and once I figured out that needed to be called, there is no correct way to call it. So I called it a working but incorrect way, meaning this is a change that is fine for me, but would never go into a pull request done this way even if others want it. (and I don’t yet know how to do it a cleaner way).
Meanwhile, for my own use, this feature is really great.