Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiedit does not play well with fields appearing multiple times on an editor form #50197

Closed
2 tasks done
olivierdalang opened this issue Sep 14, 2022 · 0 comments · Fixed by #50410
Closed
2 tasks done
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@olivierdalang
Copy link
Contributor

What is the bug or the crash?

A. When a form repeats the same fields more than once (e.g. on two distinct tabs), when opening the form, the multiedit indicator indicates unsaved changes for all but the last instance of the field when the user made no changes at all.

B. Additionaly, the first widget works for setting the value for all rows, but choosing "reset to original values" set all values to NULL instead of ignoring the multiedit. The last widget seems to work as expected.

Steps to reproduce the issue

  1. Create a layer with a "name" attribute
  2. In the project properties, edit the attribute form using the "drag and drop" designer
  3. Add a "tab 1" and "tab 2" container
  4. Move the "name" field to "tab 1"
  5. Drag the "name" field from the available widgets to "tab 2"
  6. Add two features to the layer with different values for "name"
  7. Select it, and open the multi-edit form
  8. See that the multiedit indicator is red for the "name" widget on the first tab, even if no changes were made (issue A)
  9. On the first tab, type something in the "name" widget. Then choose "reset to original values" in the indicator. See that it sets the value to NULL for all rows instead of keeping existing names (issue B).

Versions

QGIS version
3.26.2-Buenos Aires
QGIS code revision
feec3d3
Qt version
5.15.3
Python version
3.9.5
GDAL/OGR version
3.5.1
PROJ version
9.0.1
EPSG Registry database version
v10.064 (2022-05-19)
GEOS version
3.10.3-CAPI-1.16.1
SQLite version
3.38.1
PDAL version
2.4.2
PostgreSQL client version
unknown
SpatiaLite version
5.0.1
QWT version
6.1.6
QScintilla2 version
2.13.1
OS version
Windows 10 Version 2009

Active Python plugins
autocurve
dev
plugin_reloader
0.8.1
qfieldsync
dev
QgisModelBaker
dev
QuickWKT
3.1
swiss_locator
1.3.6
trackable_project_files
v1.2.2
db_manager
0.1.20
processing
2.12.99
qgepplugin
1.0.0

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

Real world use case for multiple instances of the same field is because we have a "general" tab that includes the main fields, and then several "details" tabs that include many more fields organized by topics, that include again the fields in the main tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!
Projects
None yet
1 participant