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

Changing values in Form mode of attribute table doesn't set active the Save button #45527

Closed
2 tasks done
tudorbarascu opened this issue Oct 15, 2021 · 6 comments · Fixed by #45532
Closed
2 tasks done
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Feedback Waiting on the submitter for answers

Comments

@tudorbarascu
Copy link
Member

tudorbarascu commented Oct 15, 2021

What is the bug or the crash?

Changing values in Form mode of attribute table doesn't set active the Save button.

bug

Steps to reproduce the issue

  1. Open attribute table of any layer
  2. Enable editing
  3. Change to form mode
  4. Changing any value doesn't set active the Save button so you cannot save unless you do workarounds

Yes, I did press enter to ensure the value gets saved in the field.

Workarounds:

  • Check/Uncheck the Editing button asks the user to save
  • Clicking another feature in the table sets active the Save button and you can save

Versions QGIS Master 3.21.1 and QGIS 3.16.11

<style type="text/css"> p, li { white-space: pre-wrap; } </style>
QGIS version 3.16.11-Hannover QGIS code revision 26cc1c7
Compiled against Qt 5.15.2 Running against Qt 5.15.2
Compiled against GDAL/OGR 3.2.2 Running against GDAL/OGR 3.2.2
Compiled against GEOS 3.9.0-CAPI-1.16.2 Running against GEOS 3.9.1dev-CAPI-1.14.1
Compiled against SQLite 3.34.1 Running against SQLite 3.34.1
PostgreSQL Client Version 13.3 (Debian 13.3-1) SpatiaLite Version 5.0.1
QWT Version 6.1.4 QScintilla2 Version 2.11.6
Compiled against PROJ 7.2.1 Running against PROJ Rel. 7.2.1, January 1st, 2021
OS Version Debian GNU/Linux 11 (bullseye)
Active python plugins pluginbuilder3; wps; slyr_community; Discovery; mask; project_export_inspire; pg_history_viewer; QNEAT3; QGIS_Dashboard; qgis_resource_sharing; water_topology_plugin; water_analytics; plugin_reloader; qtibia_docs_py3; scriptrunner3; QuickWKT; searchlayers; trackable_project_files; db_manager; processing

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

No response

@tudorbarascu tudorbarascu added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Oct 15, 2021
@gioman
Copy link
Contributor

gioman commented Oct 15, 2021

@tudorbarascu duplicate of #37795 ?

@gioman gioman added the Feedback Waiting on the submitter for answers label Oct 15, 2021
@elpaso
Copy link
Contributor

elpaso commented Oct 15, 2021

This fixes it for me, can you give it a try?

diff --git a/src/gui/attributetable/qgsdualview.cpp b/src/gui/attributetable/qgsdualview.cpp
index 0064644c3a..ca9fa16f11 100644
--- a/src/gui/attributetable/qgsdualview.cpp
+++ b/src/gui/attributetable/qgsdualview.cpp
@@ -1236,7 +1236,10 @@ void QgsDualView::featureFormAttributeChanged( const QString &attribute, const Q
   Q_UNUSED( attribute )
   Q_UNUSED( value )
   if ( attributeChanged )
+  {
     mFeatureListView->setCurrentFeatureEdited( true );
+    mAttributeForm->save();
+  }
 }

@nicogodet
Copy link
Member

@elpaso It works well !

@gioman
Copy link
Contributor

gioman commented Oct 15, 2021

@elpaso It works well !

@elpaso thanks for fixing this painful papercut!

@tudorbarascu
Copy link
Member Author

@elpaso Thanks. Just tested and it works! Super cool!

@tudorbarascu
Copy link
Member Author

@tudorbarascu duplicate of #37795 ?

@gioman Yes.. probably.. I searched for similar issues but didn't catch it.

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! Feedback Waiting on the submitter for answers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants