Skip to content

Fix Reuse last entered value tool and QGIS's reuseLastValue support #3788

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

VitorVieiraZ
Copy link
Contributor

@VitorVieiraZ VitorVieiraZ commented Mar 27, 2025

Support for QGIS's native reuseLastValue option and refactoring of RememberAttributesController to store attribute values persistently in QSettings instead of in-memory, making them survive reinstantiation on each new form open. This adds project-specific storage with ActiveProject integration. On project deletion, stored settings from RememberAttributesController are cleared.

Fix #3784

Copy link

Pull Request Test Coverage Report for Build 14105187091

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 60.34%

Totals Coverage Status
Change from base Build 14083397909: 0.0%
Covered Lines: 8030
Relevant Lines: 13308

💛 - Coveralls

@VitorVieiraZ VitorVieiraZ changed the title Fix reusing last entered value WIP - Fix reusing last entered value Mar 28, 2025
@VitorVieiraZ VitorVieiraZ force-pushed the fix/rememberAttributesController branch from c683cc4 to 34d2131 Compare April 15, 2025 23:25
@VitorVieiraZ VitorVieiraZ changed the title WIP - Fix reusing last entered value WIP - Fix 'Reuse last entered value' and QGIS's reuseLastValue support Apr 17, 2025
@VitorVieiraZ VitorVieiraZ changed the title WIP - Fix 'Reuse last entered value' and QGIS's reuseLastValue support WIP - Fix Reuse last entered value tool and QGIS's reuseLastValue support Apr 17, 2025
@tomasMizera tomasMizera linked an issue Apr 17, 2025 that may be closed by this pull request
@uclaros uclaros force-pushed the fix/rememberAttributesController branch from ae22d87 to c756428 Compare April 17, 2025 15:53
@uclaros uclaros changed the title WIP - Fix Reuse last entered value tool and QGIS's reuseLastValue support Fix Reuse last entered value tool and QGIS's reuseLastValue support Apr 17, 2025
@uclaros uclaros requested a review from tomasMizera April 17, 2025 15:54
@VitorVieiraZ
Copy link
Contributor Author

VitorVieiraZ commented Apr 17, 2025

Testing looks good to me. The only scenario to confirm, that is set this way now: if we have a project with QGIS's reuseLastValue set for a field and our tool on in Settings, then open the form, we encounter the checkbox for that field unchecked, although this field with QGIS's reuseLastValue set works just fine when our tool is off. If this behavior is intentional, then everything is okay from my side.

Store invalid QVariant() in settings when remember value is unchecked
Store empty QString() or actual value when is checked
Check the status in qgis form config when our global switch is off or
when we don't have an entry in the settings.
@uclaros
Copy link
Contributor

uclaros commented Apr 23, 2025

Untitled-2023-10-31-1527

@tomasMizera
Copy link
Collaborator

tomasMizera commented Apr 28, 2025

Hi @uclaros - is this one ready for review please?

@tomasMizera tomasMizera added the FROZEN 🥶 do not merge before upcoming release label Apr 29, 2025
@tomasMizera tomasMizera removed the FROZEN 🥶 do not merge before upcoming release label May 9, 2025
Copy link
Collaborator

@tomasMizera tomasMizera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are waiting for rebase and some finalization here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Reusing last entered value" is not working Reusing last entered value is broken
4 participants