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

ASLPieceMover bug #1758

Open
derimmer opened this issue Jul 5, 2024 · 7 comments
Open

ASLPieceMover bug #1758

derimmer opened this issue Jul 5, 2024 · 7 comments
Milestone

Comments

@derimmer
Copy link
Contributor

derimmer commented Jul 5, 2024

Related to boardZoomer changes

vassalengine/modules#2816

@derimmer
Copy link
Contributor Author

derimmer commented Jul 5, 2024

@derimmer
Copy link
Contributor Author

derimmer commented Jul 5, 2024

See ref to QC menu in this one: vassalengine/modules#2804

@derimmer
Copy link
Contributor Author

derimmer commented Jul 5, 2024

Another boardZoomer related bug - vassalengine/modules#2805

@derimmer
Copy link
Contributor Author

derimmer commented Jul 10, 2024

VASSAL issues 2811, 2812, and 2816 all involve the same error, caused by ASLPieceMover,DragHandlerNoImage.dragGestureRecognized(). It is not clear to me how to handle this error. Nor have I been able to determine what causes it. It clearly has something to do with moving counters but does not happen in every instance.

VASSAL issue 2804 involves a call to PieceMover rather than ASLPieceMover. Again, I cannot replicate the error.

VASSAL issue 2805 involves a call to ASLPieceMover but again I cannot replicate the error.

It is not clear to me how to handle any of the errors.

Best approach at present is to wait for more occurences and try and get more detailed information about what user action triggered it.

@uckelman
Copy link
Contributor

2804 might be a bug in Java.

Your problem in 2805 is here:

final ASLMap map = (ASLMap) firstPiece.getMap();
double pZoom = map.PieceScalerBoardZoom(firstPiece);

You can be dragging a piece which has no map, e.g., if it's being dragged off the piece palette. The bounding box is supposed to be unscaled; do whatever scaling you need to do outside of this function and you won't need to get a map here at all.

2811, 2812, and 2816 happen because you have a setDrawWinToOwnerOf which is a no-op and it doesn't cause drawWin to be set like it should. You need it to have the same body as the one in Vassal.

It would in general be better to override only the drag handler parts you need to override instead of copying it wholesale out of Vassal. The latter is what caused 2811, 2812, and 2816---your copy fell behind.

@derimmer derimmer reopened this Jul 15, 2024
@derimmer
Copy link
Contributor Author

Adding a commit to fix another minor bug in ASLPieceMover.

derimmer added a commit that referenced this issue Jul 15, 2024
derimmer added a commit that referenced this issue Jul 15, 2024
@derimmer
Copy link
Contributor Author

See also discussion in pull request #1744

@derimmer derimmer added this to the 6.6.9 milestone Jul 28, 2024
@github-project-automation github-project-automation bot moved this to To do in VASL Aug 27, 2024
@derimmer derimmer modified the milestones: 6.6.9, 6.7.0 Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

2 participants