RPTools / maptool

Virtual Tabletop for playing roleplaying games with remote players or face to face.
http://rptools.net
GNU Affero General Public License v3.0
787 stars 259 forks source link

Call finalizeCellEditing() before switching tokenTypes to make sure t… #4865

Closed maltedreschert closed 2 months ago

maltedreschert commented 2 months ago

Identify the Bug or Feature request

fixes #4650

Description of the Change

When switching to another token type, the underlying table data changes. The TableCellEditor is tied to a specific cell though and if it is not closed before changing the underlying data, that can cause data loss and/or NullReferenceExceptions. The solution is to use the finalizeCellEditing method to close and apply the data before switching the table data.

Possible Drawbacks

No drawbacks known

Release Notes


This change is Reviewable