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

Fix cursor when drag-dropping in MML #1657

Merged
merged 1 commit into from
Nov 10, 2024

Conversation

pavelbraginskiy
Copy link
Member

Previously I implemented the ability to drag files onto MML using DropTarget. This worked, but it caused various cosmetic problems, most notably where the mouse cursor would often be wrong when dragging an item, showing the Forbidden cursor when a drop actually was possible.

This moves the code from DropTarget to TransferHandler. TransferHandler is more capable than DropTarget and works much better here.

Other than moving the code from DropTarget to TransferHandler, this PR doesn't actually change any code except to show the user an error message when they try to drag an invalid file onto MML.

Copy link

codecov bot commented Nov 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 2.16%. Comparing base (7e572e1) to head (b99df8a).
Report is 6 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##             master   #1657      +/-   ##
===========================================
- Coverage      2.16%   2.16%   -0.01%     
  Complexity      209     209              
===========================================
  Files           268     268              
  Lines         30924   30927       +3     
  Branches       5290    5290              
===========================================
  Hits            669     669              
- Misses        30098   30101       +3     
  Partials        157     157              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HammerGS HammerGS merged commit 3cdebe9 into MegaMek:master Nov 10, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants