Bug report #19930
"Zoom to feature" does not work
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Alessandro Pasotti | ||
Category: | Attribute table | ||
Affected QGIS version: | 3.2.3 | Regression?: | No |
Operating System: | linux (ubuntu bionic) | Easy fix?: | No |
Pull Request or Patch supplied: | Yes | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 27753 |
Description
The "Zoom to Feature" action in the attribute table is not working as I would expect. If I:
- Create a SQL layer from a spatialite data source
- Select "Open attribute table..." for this layer
- Create a field filter
- Search for a particular value
- Right click on the result row and select "Zoom to feature"
...then QGIS reports "Zoom to feature id failed: Feature not found".
The feature exists (I'm looking at it in the attribute table). The feature has a unique id, and the corresponding column is identified as the unique id column.
History
#1 Updated by Giovanni Manghi about 6 years ago
- Status changed from Open to Feedback
Is this only true for SQL layers (with filters applied?)?
#2 Updated by Lars Kellogg-Stedman about 6 years ago
It looks like this only happens with a SQL layer. It works fine with a shapefile layer.
#3 Updated by Alessandro Pasotti about 6 years ago
- Assignee set to Alessandro Pasotti
I cannot reproduce on current master, I tried with a PG and a Spatialite layer without success, can you please share a small project and data to reproduce the issue?
#4 Updated by Giovanni Manghi about 6 years ago
Tested on master/linux and works as expected here (SL datasource).
#5 Updated by Nyall Dawson about 6 years ago
Maybe this is for virtual layers?
#6 Updated by Giovanni Manghi about 6 years ago
Nyall Dawson wrote:
Maybe this is for virtual layers?
tried them and seems ok here, nut let me try again.
#7 Updated by Lars Kellogg-Stedman about 6 years ago
I'll grab the current master and see if the problem reproduces with my actual data.
#8 Updated by Lars Kellogg-Stedman about 6 years ago
I see the same behavior in the latest nightly build (208571a). I've recorded a video of the behavior here in case I'm neglecting something in my description of the problem: https://youtu.be/Xk0vMaVsypY
Let me know if you would like more information.
#9 Updated by Alessandro Pasotti about 6 years ago
Thanks for the video!
Since we don't know exactly where the problem is, it would be really helpful if you could share some data and a project to test with (plus the SQL query that you set in db-manager), this would make it easier to replicate your scenario.
#10 Updated by Lars Kellogg-Stedman about 6 years ago
Here's a sample project and data that reproduces the problem:
#11 Updated by Giovanni Manghi about 6 years ago
- Status changed from Feedback to Open
#12 Updated by Alessandro Pasotti about 6 years ago
The table has no primary key, so there is no way to retrieve it from the iterator, I'll try to find a solution but it's not trivial.
Btw, the filter step in attr table is not necessary: zoom to feature does not work even on unfiltered features.
#13 Updated by Alessandro Pasotti about 6 years ago
- Pull Request or Patch supplied changed from No to Yes
- Status changed from Open to In Progress
#14 Updated by Alessandro Pasotti about 6 years ago
- Status changed from In Progress to Closed
- Resolution set to fixed/implemented