[Qgis-developer] Query Set using SetSubstring does not return record - resolved but with a question

maaza mekuria sailmcm at yahoo.com
Thu Jun 9 14:22:58 EDT 2011


Thank you Anita for the suggestions. I would like to put a ticket out on the needed improvement for this issue. I feel it is highly inconsistent that even after applying the setSubsetString(qry) , if one selects all the data, the selection includes all the items in the layer. Is there another way to select what is only included on the layer as per the subsetString? 

When I execute a selection set of all the features on the layer, the sub-query appears to be invisible to the selection code, and it ends up telling me all the features are selected. This is misleading because I would think I have access to all the features as per what the selection size is reporting from Layername.selectedFeatureCount() number.

Thank you again for your help,

Maaza

--- On Thu, 6/9/11, Anita Graser <anitagraser at gmx.at> wrote:

From: Anita Graser <anitagraser at gmx.at>
Subject: Re: [Qgis-developer] Query Set using SetSubstring does not return record - resolved but with a question
To: "maaza mekuria" <sailmcm at yahoo.com>
Cc: "QGIS Developer" <qgis-developer at lists.osgeo.org>
Date: Thursday, June 9, 2011, 2:51 AM

Hi Maaza,

On Thu, Jun 9, 2011 at 3:10 AM, maaza mekuria <sailmcm at yahoo.com> wrote:

I have learned from you how I can select all the features in a layer through code using extents and attribute lists. What I would like is to be able to use a simple command that says layer->selectall() or something like that

Feel free to add this feature request to the bug tracker or to even write the patch to add this function to the layer class.

is it alright to have a method that updates the selection set using the setSubString query? Why not? 
What is the reason that such a powerful way to query the data does not also have a means to update the selection set? 
Imho, the query string has nothing to do with the selection set. If you first set the query string, you can then select all features left in the layer.

Best wishes, Anita 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110609/9058e92a/attachment.html


More information about the Qgis-developer mailing list