Skip to content

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

@kwvanderlinde

Description

@kwvanderlinde

Describe the Bug

When editing an exsting table, if I modify the range of some entry in the middle to be invalid and then try to apply it, I will get an error telling me about the problem and allowing me to correct it. But if I then Cancel, the table will contain only those entries higher up than the error, losing everything else.

To Reproduce

  1. Add a new table named Error test. Give it six entries with the ranges set to 1, 2, 3, 4, 5, 6, respectively.
  2. Edit the table. Modify the 3 range to 3-four and click Accept.
  3. See the error dialog saying Table "Error test" contains bad range "3-four" on row 2. C this dialog.
  4. In the Edit Table dialog, press the Cancel button.
  5. Edit the table again. See that only the 1 and 2 entries still exist.

Expected Behaviour

A table should not be modified when the Edit Table dialog is closed by the Cancel button. It should not be possible to commit partial results whether using the Accept or Cancel buttons.

Screenshots

Original table:
Image

Modified, with error:
Image

After cancelling and reopening:
Image

MapTool Info

1.18.5

Desktop

Linux Mint 22.2

Additional Context

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

Awaiting-Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions