Maptool: Bring to Front/Send to Back sometimes need to be done twice

Created on 5 Sep 2019  路  9Comments  路  Source: RPTools/maptool

Describe the bug
Sometimes selecting a token and using Arrange -> Bring to Front/Send to Back requires a second attempt before it works.

To Reproduce
Steps to reproduce the behavior:

  1. Start a new campaign
  2. Drop two tokens on default map.
  3. Set both to Large size (makes it easier to select them later)
  4. Drag the second token so that it partially overlaps the first.
  5. With 2nd token selected, right-click and Send to Back - token goes back behind other token
  6. Right-click and Bring to Front - nothing happens
  7. Repeat action and token comes to the front.
  8. Now select 1st token, right-click and Bring to Front - token comes forward.
  9. Right-click and Send to Back - nothing happens.
  10. Repeat action and token goes to back.

Expected behavior
Should only take one action to bring token forwards/backwards.

Screenshots
Positioning of tokens for ease of selection.
Screenshot 2019-09-05 12 17 55

MapTool Info

  • Version: 1.5.2+
  • Install: New, Upgrade [previous version], or JAR [Java Version]

Desktop (please complete the following information):

  • OS: Windows
  • Version: 10
bug tested

All 9 comments

Can't replicate this with 1.5.4 RC1 and the develop branch.

Curious. It's a 100% reproducible for me on two different PCs.

Ok I experienced the bug. But I'm having trouble reproducing it, most of the time it works just fine.

With existing campaign files with lots of token, some tokens always work while others behave as noted above or sometimes take 3 or more attempts. The only way I found to reliably produce it for me was the steps noted above on a clean campaign.

I could not reproduce with versions prior to 1.5.2.

Pretty sure my PR #662 fixes it. @Phergus, could you test it? You seem to trigger the bug more reliably than I can.

Will do.

Tested and working as expected.

Thanks, @Phergus !

The issue was that getSmallestZOrder and getLargestZOrder rely on an correctly ordered tokenOrderedList (the two functions respectively return the first and last entry of that list).

That list was not reordered on the server after the sendToBack / bringToFront. That is ow fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nmeier picture nmeier  路  9Comments

cwisniew picture cwisniew  路  10Comments

melek picture melek  路  8Comments

mrkwnzl picture mrkwnzl  路  9Comments

Merudo picture Merudo  路  6Comments