Skip to content

Conversation

@kwvanderlinde
Copy link
Collaborator

@kwvanderlinde kwvanderlinde commented Nov 18, 2025

Identify the Bug or Feature request

Fixes #5869

Description of the Change

Changes how the New Table / Edit Table commits the entries to a LookupTable. All entries are now parsed prior to any modification of the LookupTable, stored in a list for later consumption. Only once all validations are completed are any table properties modified or entries added.

Also fixes an issue where GenericDialog would ignore the result of AbeillePanel#commit(). This caused a problem where dialogs with validation errors would close themselves after the user dismissed the validation error modal. So far this has only affected the Edit Token and Add Resource dialogs in development builds. Other dialogs do not yet take full advantage of GenericDialog and have to handle the commit failures explicitly, so they do not have this issue.

Possible Drawbacks

None

Documentation Notes

N/A

Release Notes

  • Fixed a bug where canceling the Edit Token dialog after a validation error would result in table data being lost.

This change is Reviewable

This case only applies for AFFIMRATIVE actions such as pressing a dialog's OK button. By cancelling the dialog close, we
give the user a chance to correct and validation errors.

Fixes the **Add Resource** and **Edit Token** dialogs that have both been changed to better leverage the GenericDialog,
but as a result suffered from closing upon validation errors.
The parsing (and thus validation) of the entries is now done before any modifications have been applied to the
underlying `LookupTable`. This way, validation errors will not result in table data being lost if the user later cancels
the dialog.
@kwvanderlinde kwvanderlinde self-assigned this Nov 18, 2025
@github-actions github-actions bot added the bug label Nov 18, 2025
@kwvanderlinde kwvanderlinde moved this from Todo to Awaiting-Review in MapTool 1.19 Nov 18, 2025
@Baaaaaz
Copy link
Contributor

Baaaaaz commented Nov 18, 2025

Also fixes an issue where GenericDialog would ignore the result of AbeillePanel#commit(). This caused a problem where dialogs with validation errors would close themselves after the user dismissed the validation error modal. So far this has only affected the Edit Token and Add Resource dialogs in development builds. Other dialogs do not yet take full advantage of GenericDialog and have to handle the commit failures explicitly, so they do not have this issue.

Admittedly I could wait and check once this ticket is merged but.... do you think fixing this issue will also resolve #5831?

@github-project-automation github-project-automation bot moved this from Awaiting-Review to To-Be-Merged in MapTool 1.19 Nov 20, 2025
@cwisniew cwisniew added this pull request to the merge queue Nov 20, 2025
Merged via the queue into RPTools:develop with commit 3930532 Nov 20, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from To-Be-Merged to Merged in MapTool 1.19 Nov 20, 2025
@kwvanderlinde kwvanderlinde deleted the bugfix/5869-edit-table-partial-commit branch November 20, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

[Bug]: Edit Table dialog partially commits when applying invalid range

3 participants