[Qgis-developer] undisplayed elements are selected

bernhard.stroebl at jena.de bernhard.stroebl at jena.de
Fri Mar 16 04:40:37 EDT 2012

some thoughts (unordered):

A) thinking from the table side I can always select any feature there 
regardless if it is currently visible or not. When I zoom to the 
selection then I am responsible that all features are visible in order 
to see my selection. So the current behaviour is just the other way 
round. If I want to exclude features I have to define a query on the 
layer filtering out unwanted features.

B) map visibility can be controlled by three ways:
1) visibility of the layer on/off => features are not selectable in map
2) scale-based visibility of the whole layer => features get selected, 
even when not visible
3) rule based style with scale based visibility for rules (Denis' case) 
=> features get selected, even when not visible
To me case 1 is expected behaviour, cases 2 and 3 are not (although not 
too unexpected when considering thought A), but hard to explain to a user)

- possible solution to accompany A) and B): show all selected features 
in selection color regardless of their individual scale-based 
visibility. No idea if that is feasible.


Am 16.03.2012 09:12, schrieb Andreas Neumann:
> hm - I agree with Denis. Features invisible because of scale ranges
> should not be selectable and should not react to map tips.
> In QGIS Server we filtered the invisible features away in GetFeatureInfo
> requests. The same should be done for selecting features in QGIS desktop
> and for the map tips. The rule-based renderer V2 offers a method called
> willRenderFeature() (see
> http://doc.qgis.org/api/classQgsRuleBasedRendererV2.html#b514bc63bd9e744faca24236a89b7e4d)
> that could be used to see if such a feature is displayed or not. But the
> method says that it has to be called between startRender() and
> stopRender() calls - so I don't know if it would work for
> querying/selection features?
> Any thoughts?
> Andreas
> On Fri, 16 Mar 2012 00:44:02 -0700, Nathan Woodrow wrote:
>> I would say this could be an expected behaviour as styling is only a
>> visual thing and doesn't affect the data....maybe.
>> - Nathan
>> Sent from my Windows Phone
>> From: Denis Rouzaud
>> Sent: 16/03/2012 5:20 PM
>> To: Qgis-developer at lists.osgeo.org
>> Subject: [Qgis-developer] undisplayed elements are selected
>> Hi all,
>> When using the rules style for a layer and defining a scale range, if
>> you select by rectangle on the map, everything is selected including
>> undisplayed features.
>> Is there already an issue opened, I searched without any result.
>> Greetings,
>> Denis
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer

________ Information from NOD32 ________
This message was checked by NOD32 Antivirus System for Linux Mail Server.

More information about the Qgis-developer mailing list