How to prevent selection below a locked layer?

Hi all,

I am only a casual Sketch user, so maybe my mental model is off here. When I sketch a UI and add a layer on top that represents a modal overlay, I would like to have this as my “background” to work on. I usually lock this layer to keep it in place and start adding layers (my UI elements) on top of it. When I want to select some of those top-level layers using marquee, the elements behind my locked layer are being selected, too, which is definitely not my intention. Is it possible to make a layer a “selection barrier” (if that makes sense)? For locked layers, this would make much sense in my opinion.

Thanks,
Michael

Hi Michael, welcome to the Sketch Forum!

In version 97 we introduced an improvement to work with locked layers: you can select them through the layer list and make any edits you need!

So I think you just need to change which layers you lock: instead of locking the top layer that works as the overlay, lock the layers that are in the background, behind the overlay. You’ll still be able to select them through the Layer List to make edits and you can use the marquee tool to select the layers on top that belong to the overlay :smiley:

I hope this helps!

Hi Jorge,

thanks. I think that will do the trick for me :slight_smile:

The process of locking all background layers is a bit more work than I like but I think those additional 3 seconds won’t make my day too miserable :wink:

Best, Michael

1 Like

True, there can be quite a lot layers in the background. Could grouping them and locking the group make it easier? Just a thought here… :thinking: