maptool icon indicating copy to clipboard operation
maptool copied to clipboard

[Bug]: Update Token Property edits with "OK" button.

Open FullBleed opened this issue 1 year ago • 1 comments

Describe the Bug

When adding new data to a field (like Display Name) in order to get the value to stick you have to click out of the field before clicking "OK".

To Reproduce

  1. Create New Property.
  2. Add Display name. Don't click out of Display Name field.
  3. Click OK.

Expected Behaviour

Updated fields update when clicking OK.

Screenshots

No response

MapTool Info

1.15.0 Beta 1

Desktop

Windows

Additional Context

No response

FullBleed avatar Mar 02 '24 07:03 FullBleed

Somewhat related...

If you select a Token Type on the left it populates a text box on the right under Token Type>Name.

That box is selectable and editable, but unlike the solution in the OP (to click out of the field before clicking "OK" to apply a change) there does not appear to be any way to apply a change to the Token Property name.

FullBleed avatar Mar 06 '24 22:03 FullBleed

Related to that bug is also the behaviour of the delete, move up and move down buttons while editing a cell. Especially the delete function while being in edit mode causes an IndexOutOfBoundsException. I have a fix for the original problem and could implement it so that it fixes the other two problems as well, if I am allowed to do that.

maltedreschert avatar Jul 17 '24 13:07 maltedreschert

Related to that bug is also the behaviour of the delete, move up and move down buttons while editing a cell. Especially the delete function while being in edit mode causes an IndexOutOfBoundsException. I have a fix for the original problem and could implement it so that it fixes the other two problems as well, if I am allowed to do that.

Not sure how up to date all of this is: https://github.com/RPTools/maptool/wiki/Contributor-Setup-Instructions-For-MapTool

@cwisniew can assign.

FullBleed avatar Jul 18 '24 01:07 FullBleed

Thanks for the information, The setup instructions do not seem to be up to date, as MapTool uses Java 21 now, as far as I can see. @cwisniew I have a fix ready for the bug and if you assign it to me, I can make a pull request.

I think this bug also relates to #4650 because there the TableCellEditor is also active in that case, while the underlining data model changes.

maltedreschert avatar Jul 18 '24 09:07 maltedreschert

Thanks for the information, The setup instructions do not seem to be up to date, as MapTool uses Java 21 now, as far as I can see. @cwisniew I have a fix ready for the bug and if you assign it to me, I can make a pull request.

I think this bug also relates to #4650 because there the TableCellEditor is also active in that case, while the underlining data model changes.

While you're in there... have you noted this? https://github.com/RPTools/maptool/issues/4711

FullBleed avatar Jul 18 '24 19:07 FullBleed

@FullBleed Bug #4711 is different because it does not deal with the TableCellEditor, but just a view update. I can take a look at that one too though, if you want me to. Two issues that are directly related to this one are

  • #4650
  • deleting a property while editing it (no issue yet, as far as I can see)
  • moving a property up or down while editing (also no issue) I don't know, if you want to have separate issues for all of these problems or if should just fix them in one PR. Perhaps you can give me a hint here, how you do things.

maltedreschert avatar Jul 19 '24 12:07 maltedreschert

Appreciate the PR. Hope to see more from you in the future. :)

FullBleed avatar Jul 20 '24 08:07 FullBleed

You're welcome. I saw some low hanging fruit and needed to crush some bugs. :)

maltedreschert avatar Jul 20 '24 18:07 maltedreschert