Kruptein / PlanarAlly

A companion tool for when you travel into the planes.
https://www.planarally.io/
MIT License
400 stars 73 forks source link

[BUG] 'Move to Back' button doesn't take effect until clicking elsewhere #1388

Closed rexy712 closed 8 months ago

rexy712 commented 8 months ago

Describe the bug This has been a very minor annoyance for a long time. When changing the order of shapes on a layer, there are the options 'Move to Back' and 'Move to Front' in the context menu. Choosing these options takes effect, but only after a client has made a click on another point of the map. While this is mildly annoying to the one making the change, it's more so annoying when one person makes a change and another person doesn't see the change until their client updates.

To Reproduce Steps to reproduce the behavior:

  1. Create 2 shapes which overlap.
  2. Select one of the shapes and hit 'Move to Back'
  3. Click elsewhere to have the rendering update
  4. Other players will still see the old order until they click elsewhere to update

Expected behavior Changing the order of shapes should have an immediate update so that everyone in a session stays in sync.

Screenshots Player 1 (on the left) changes the shape order and doesn't see an update until clicking elsewhere. Player 2 (on the right) still doesn't see the update until they click elsewhere.

https://github.com/Kruptein/PlanarAlly/assets/2442544/3787364b-5ec0-4fdd-aa88-2bde601db8e8

Desktop (please complete the following information):