qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.52k stars 2.99k forks source link

Relation Editor Widget always jumps to first feature when editing #46730

Closed esnyder-rve closed 1 year ago

esnyder-rve commented 2 years ago

What is the bug or the crash?

Editing a field in the relation editor widget always sends to the first feature on the list while typing/editing a field. This is only noticeable if your not editing the first feature in the list.

Steps to reproduce the issue

In either the identify popup, or the form view on the attribute table, attempt to edit a field of a second feature in the list (something like text, or a number)

https://user-images.githubusercontent.com/61027950/148451073-6570b139-d3e7-4948-8e46-bde1f790cdd9.mp4

In the video above, I first change the dropdown list item for the second "Incoming Pipe", then change the Downstream Rim to Invert field to 1.23

Versions

QGIS version 3.22.2-Białowieża QGIS code revision 1601ec46d0 Qt version 5.15.2 Python version 3.9.5 Compiled against GDAL/OGR 3.4.0 Running against GDAL/OGR 3.4.1 Compiled against PROJ 8.2.0.%3.%4 Running against PROJ 8.2.1 EPSG Registry database version v10.041 (2021-12-03) GEOS version 3.10.0-CAPI-1.16.0 SQLite version 3.35.2 PDAL version 2.3.0 PostgreSQL client version 13.0 SpatiaLite version 5.0.1 QWT version 6.1.3 QScintilla2 version 2.11.5 OS version Windows 10 Version 2009

Active Python plugins db_manager 0.1.20 grassprovider 2.12.99 MetaSearch 0.3.5 processing 2.12.99 sagaprovider 2.12.99

Supported QGIS version

New profile

Additional context

No response

esnyder-rve commented 2 years ago

Here is a little sample project with points and lines representing the issue. Sample_Project.zip

esnyder-rve commented 2 years ago

@gioman What is the feedback you need?

gioman commented 2 years ago

@gioman What is the feedback you need?

@esnyder-rve I was about to leave a comment: I can't either 1) understand ow to replicate the described behavior with the provided sample project or 2) can't replicate

esnyder-rve commented 2 years ago

https://user-images.githubusercontent.com/61027950/148559235-719b6ca6-1c24-4458-88c0-6e44fe49647d.mp4

Sample_Project_v2.zip

So, what I'm doing here is attempting to edit a field in Line 102 through the relation widget in Point 2. For some reason, the currently selected feature in the relation editor doesn't want to highlight in the list with the clean profile (unlike the real data version first attached with dark theme).

I go to the Identify Form for Point 2 and select Line 102 in the Relation Widget (again not highlighted in the form for some reason) and increment the Number field. Changing the field will reset the widget back to the first feature on the list (which is Line 101).

gioman commented 2 years ago

Sample_Project_v2.zip

@esnyder-rve thanks now is clear.

For some reason, the currently selected feature in the relation editor doesn't want to highlight in the list with the clean profile (unlike the real data version first attached with dark theme).

@esnyder-rve I would report this as a separate UI issue of the default theme.

esnyder-rve commented 2 years ago

I would report this as a separate UI issue of the default theme.

@gioman Oddly, this issue also exists when I switch to the Night Mapping theme for the clean profile. I don't know what's going on there, but I'll report that separately. Were you also experiencing the lack of highlighting on your end?

gioman commented 2 years ago

Were you also experiencing the lack of highlighting on your end?

@esnyder-rve yes

esnyder-rve commented 2 years ago

I wonder if it's something a plugin could provide as the original video was from my default profile with the following plugins:

Active Python plugins actions_for_relations <-- Maybe the source? 1.2.0 annotationManager 0.5 AppendFeaturesToLayer 1.2.0 cartography_tools 1.2.1 create_layer_from_selected_features 1.1 firstaid 2.1.5 FreehandRasterGeoreferencer 0.8.3 Go2NextFeature3 2.1 joinmultiplelines Version 0.4.1 latlontools 3.5.10 LayerStyleLoader 0.2 loadthemall 3.3.0 MemoryLayerSaver 4.0.4 mmqgis 2021.9.10 monokai 1.0 multilayerselect 1.4.1 MultipleLayerSelection 2.0 multiple_layers_tools 1.2 openlayers_plugin 2.0.0 PluginLoadTimes 3.0.1 polystrip 3.0.1 postgis_geoprocessing 0.9 processing_fusion 3.0 processing_saga 0.5.0 processing_taudem 3.0.0 processing_wbt 1.3.1 QNeighborhood 0.1.1 qrbarcodeitem 0.2.0 QuickMultiAttributeEdit3 version 3.0.3 QuickOSM 2.0.0 redLayer 2.2 rvt-qgis 0.8.1 searchlayers 3.0.5 SelectWithin 0.4 Serval 3.10.2 slyr_community 3.2.1 Submission 0.6 db_manager 0.1.20 grassprovider 2.12.99 processing 2.12.99 sagaprovider 2.12.99

signedav commented 2 years ago

Maybe related to #43902

aliasatp commented 2 years ago

I realised the same issue. I have a related table and when I edit a row, different from the first one, it goes back to the first everytime I try to fill a field directly in the form widget. My related table has "default value" (formulas) in many fields. I realised this behaviour only with this related table (with formulas as default value). I suppose it may dues to recalc activity even though it doesn't happen if I fill the table in "table" format.

EricM71 commented 2 years ago

Hello !

I have the exact same issue with a project in QGis 3.24.0 and QGis 3.22.2 but everything seems good with the same project in QGis 3.20

alexbruy commented 1 year ago

Seems fixed in the latest master (94b62accf2a1cfc892bc9097cd4dd5f8a1f60ab0).

esnyder-rve commented 1 year ago

Just tested, I can confirm that this has been fixed. The UI issue stated still has not, but that is a separate issue (#46751).