Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ClassCastException when using Arrange -> Send to Back from Draw Explorer #3489

Closed
Phergus opened this issue Jul 12, 2022 · 1 comment · Fixed by #3490
Closed

[Bug]: ClassCastException when using Arrange -> Send to Back from Draw Explorer #3489

Phergus opened this issue Jul 12, 2022 · 1 comment · Fixed by #3490
Assignees
Labels
bug tested This issue has been QA tested by someone other than the developer.

Comments

@Phergus
Copy link
Contributor

Phergus commented Jul 12, 2022

Describe the Bug

Attempting to change the Z order of drawings using Send to Back from the Draw Explorer can produce a ClassCastException.

To Reproduce

  1. Load attached campaign.
  2. Open Draw Explorer if not open.
  3. Under Background select the green rectangle (width(185) height(121)).
  4. Right-click to access Arrange -> Send to Back.
  5. Get error dialog with CCE.
  6. Drawing is removed from map.

Error:

java.lang.ClassCastException: class java.util.ArrayList cannot be cast to class java.util.LinkedList (java.util.ArrayList and java.util.LinkedList are in module java.base of loader 'bootstrap')
	at net.rptools.maptool.model.Zone.addDrawableRear(Zone.java:1329)
	at net.rptools.maptool.client.ui.drawpanel.DrawPanelPopupMenu$SendToBackAction.actionPerformed(DrawPanelPopupMenu.java:321)
	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
...

Expected Behaviour

Expect drawing to be pushed to back.

Screenshots

Before attempting change.
image

MapTool Info

MT 1.12.0 alpha 1

Desktop

Windows 10

Additional Context

Campaign file. Remove .zip extension.
Drawing Order.cmpgn.zip

@Phergus
Copy link
Contributor Author

Phergus commented Jul 13, 2022

Tested changes. Working as expected now.

@Phergus Phergus added tested This issue has been QA tested by someone other than the developer. labels Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug tested This issue has been QA tested by someone other than the developer.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants