Skip to content

Grid states should render consistently regardless of the order they are set. #2346

@kwvanderlinde

Description

@kwvanderlinde

Describe the bug
The order that Grid Image states appear on a token depends on the order they are set on that token. The state configuration has no impact on the layout.

To Reproduce
Steps to reproduce the behavior:

  1. Create two 4x4 Grid Image states via the Campaign Properties dialog (let's call them "A" and "B", with "A" being before "B").
  2. Create a token.
  3. Right click the token, select "States" and enable state "A".
    • The image for "A" should show in the bottom right corner of the token.
  4. Right click the token, select "States" and enable state "B".
    • The image for "A" should still be in the bottom right, with the image for "B" immediately to its left.
  5. Right click the token, select "States" and "Clear State".
  6. Repeat step (4) and then step (3).
    • The image for "B" should now be in the bottom right, with the image for "A" immediately to its left.

Expected behavior
The state configuration should determine the layout order of the states rendered on a token. I.e., "A" should always appear in the bottom left, with "B" to its right. Or perhaps the other way around, but it should be consistent for a given set of enabled states.

Screenshots

Here is a what happens when I set "A" (a d20) and then "B" (a d12):
image
And if I set "B" first and then "A" I get:
image

MapTool Info

  • Version: 1.7.0
  • Install: New

Desktop (please complete the following information):

  • OS: Linux Mint
  • Version: 20

Additional context

Interestingly, the layout order of the states appears to be remembered even after the states are cleared. If you clear the states and then set them simultaneously using the "Edit Token" dialog, they will appear in whatever order they were previously laid out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions