Re: [Qgis-developer] Problems using QgsVectorLayer::selectedFeatures()

2011-02-07 Thread Federico J . Fernández
> > On Mon, Feb 7, 2011 at 12:40 PM, Federico J. Fernández > wrote: > > QgsFeatureList &featureList = this->currentLayer->selectedFeatures(); > > You only store reference to a temporary list returned by > selectedFeatures(). That list is destroyed when that function > terminates, so you have a

Re: [Qgis-developer] Problems using QgsVectorLayer::selectedFeatures()

2011-02-07 Thread Martin Dobias
On Mon, Feb 7, 2011 at 12:40 PM, Federico J. Fernández wrote: >     QgsFeatureList &featureList = this->currentLayer->selectedFeatures(); You only store reference to a temporary list returned by selectedFeatures(). That list is destroyed when that function terminates, so you have an invalid refer

Re: [Qgis-developer] PostGIS manager: no preview

2011-02-07 Thread Giovanni Manghi
Hi Martin, > I believe this problem has been fixed in trunk already (r15075). I'm using r15130 under Ubuntu 10.04 and there is no preview. Under windows/trunk when selecting the preview tab it returns a python error: An error has occured while executing Python code: TypeError: native Qt signa

Re: [Qgis-developer] Problems using QgsVectorLayer::selectedFeatures()

2011-02-07 Thread Federico J . Fernández
> > I'm confused - you don't have to allocate any pointers for the list. > The QList class uses implicit sharing of data (like many other qt > classes), so the list can be passed by value very cheaply. Please > paste the code of the whole method if it's not too long and indicate > on what line the

Re: [Qgis-developer] Problems using QgsVectorLayer::selectedFeatures()

2011-02-07 Thread Martin Dobias
On Thu, Feb 3, 2011 at 3:46 PM, Federico J. Fernández wrote: >> >> In what context do you call the selectedFeatures() method, what is the >> expected result and what do you get instead? > > I get the correct values. > > I call it in a slot that is called when the user clicks the map with an > Emit