When editing a cell in the campaign settings token table by double clicking on a Cell in the JTable,
a TableCellEditor is created, that enables changing the value of the cell. This editor needs to be closed
to apply the changes. By default this is done, by clicking inside the JTable again, outside of the currently selected cell,
or programmatically by calling JTable().getCellEditor().stopCellEditing().
The public method finalizeCellEditing() was added to the TokenPropertiesManagementPanel that checks, if the
JTable is in edit mode and if yes, calls stopCellEditing().
The method now can be called when pressing the "Ok" button in the CampaignPropertiesDialog to first apply the changes before closing the campaign editor.
The call is also added to functions initPropertyMoveUpButton and initPropertyMoveDownButton for moving,
initPropertyDeleteButton for deleting a property and
initPropertyAddButton for adding properties
because doing that will also cause problems with duplicated entries and OutOfBoundsExceptions.
Possible Drawbacks
No drawbacks known
Documentation Notes
N/A
Release Notes
Fixes an issue with losing changes made to campaign tokens by pressing the "Ok" button without clicking somewhere else first.
Fixes a crash when trying to delete a token while simultaneously editing a property of that token.
Fixes a problem with moving a token while simultaneously editing a property of that token. This created a duplicate of the token with the old properties and added unrelated data to the token currently edited.
Identify the Bug or Feature request
fixes 4710
Description of the Change
When editing a cell in the campaign settings token table by double clicking on a Cell in the JTable, a TableCellEditor is created, that enables changing the value of the cell. This editor needs to be closed to apply the changes. By default this is done, by clicking inside the JTable again, outside of the currently selected cell, or programmatically by calling
JTable().getCellEditor().stopCellEditing()
. The public methodfinalizeCellEditing()
was added to theTokenPropertiesManagementPanel
that checks, if the JTable is in edit mode and if yes, callsstopCellEditing()
. The method now can be called when pressing the "Ok" button in theCampaignPropertiesDialog
to first apply the changes before closing the campaign editor. The call is also added to functionsinitPropertyMoveUpButton
andinitPropertyMoveDownButton
for moving,initPropertyDeleteButton
for deleting a property andinitPropertyAddButton
for adding properties because doing that will also cause problems with duplicated entries and OutOfBoundsExceptions.Possible Drawbacks
No drawbacks known
Documentation Notes
N/A
Release Notes
This change is