7

In MapInfo, it is possible to turn 'selectability' off on layers, which means that when you click on the map objects on that layer aren't selected. It's very useful.

Is there a way to accomplish this in QGIS?

I should add that what I am specifically referring to the information tool. In the attached screenshot you can see that the street, the neighborhood and the city were all highlighted, but I would like to restrict it to selecting roads only. enter image description here

9

If you open Project Properties there is an "Identify Layers" tab that allows you to turn on and off the layers that are identifiable, is that what you're after?

2
  • Yes. I think it is.
    – marcp
    Jun 22 '16 at 16:24
  • 1
    Cheers Ed, didn't know about this. Strangely however on my system it doesn't seem to matter if the layers are checked or unchecked, the identify tool still selects them. Jun 23 '16 at 7:21
5

I've stumbled upon the complete answer by blind luck. In the screen shot I included in the question you can see that the 'Mode' selector in the Identify Results panel is set to 'Top Down', which results in all objects below the cursor being identified.

The complete list is :

  1. Current Layer - identifies objects in the currently highlighted layer
  2. Top Down, stop at first - identifies the object in the topmost layer
  3. Top Down - identifies all objects in the order of the layer list
  4. Layer Selection - pops up a dialog showing the list of top down layers. Selecting one causes it to be identified.

The 'Identify Layers' panel in Project Properties is honored regardless of which mode is selected.

There is also a disabled 'View' list control. Nothing I've done enables that... And a help button which actually contains some of this information.

1
  • This should be higher up. Super cool, thanks for pointing it out!
    – corvus
    Dec 11 '17 at 23:03
1

When you have multiple layers only the layer that is highlighted in the layers panel can have items selected, whether or not this layer is on top, on the bottom, or if its not visible. As long as it's highlighted, items can be selected.

The alternative logic (your question) is that all items that you don't have highlighted in the layers panel cannot be selected. This also goes for multiple items you have highlight, only the last layer is 'selectable'.

This is the closest that I'm aware you can get to what you want to achieve. I'm quite interested in an example of why you would want what you describe?

EDIT: Thanks for the image. This is a different issue to the question you asked as your not selecting features, rather you're using the identify tool. Unfortunately I cannot recreate your problem on my system.

4
  • I've added a screenshot to my question showing that items in 3 layers were selected, when only one layer was highlighted.
    – marcp
    Jun 21 '16 at 15:58
  • Do you have this issue in other projects? Jun 22 '16 at 7:33
  • This is the first time I've tried to use QGIS for anything other than a data viewer, so I can't really say. But today it's behaving more the way I would expect, if I click on a road it 'selects' only the road, clicking between the road 'selects' the top polygon. Don't know what I've changed in the project in the meantime.
    – marcp
    Jun 22 '16 at 17:03
  • I'd suggest we are using the term 'select' differently, I think you are referring to 'selecting for editing'. The identify tool (to my mind) selects objects as well, they are clearly highlighted and their information appears in the 'Identify Results' panel. It's a different mode of operation so the 'selection' has a different result. Maybe this is a QGIS terminology that I will have to adapt to.
    – marcp
    Jun 22 '16 at 17:06
0

I was looking for a solution to make a layer inactive, i.e. when you use selection tool, nothing happens.

Looked through project settings and in my QGIS version 3.12.3 there are layer flags that can only disable feature identification but not selection.

I remembered that there are also signal settings that can be changed with a use of pyqgis

The command below will fully disable layers' feature selector (however you can highlit them using attribute table).

iface.activeLayer().selectionChange.disconnect()

But still I can't figure out how to reset this thing. Maybe it's about pyqtSignal or something.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.