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

Left Clicking a Unit no longer targets the unit by default. #2819

Closed
sldfgunslinger2766 opened this issue May 2, 2021 · 12 comments · Fixed by #2827
Closed

Left Clicking a Unit no longer targets the unit by default. #2819

sldfgunslinger2766 opened this issue May 2, 2021 · 12 comments · Fixed by #2827

Comments

@sldfgunslinger2766
Copy link
Contributor

sldfgunslinger2766 commented May 2, 2021

Environment

v.0.49.0 Dev
Java vendor AdoptOpenJDK
Java version 11.0.10
Platform Windows 10 10.0 (amd64)
Total memory available to MegaMek: 1,048,576 kB

Description

In past MM versions, left clicking a unit during the targeting phase would target the unit by default, enabling the 'Fire' tab. In this latest Dev version, a player must now right click the unit which then deployes the target/select drop down.

Files

megameklog.txt

@sldfgunslinger2766
Copy link
Contributor Author

This behavior also seems to reset torso twisting, but I need to test this further.

@Tecmes
Copy link

Tecmes commented May 2, 2021

Indeed left-click twists the torso, and right-click targets. But it doesn't seem intentional as right-clicking ALSO bring the contextual menu.

Click-twisting would be great, though. Why not shift-clicking? Just sayin'

@SJuliez
Copy link
Member

SJuliez commented May 2, 2021

I can't reproduce this. Shift-clicking twists the torso and left-clicking on some unit targets it. I know of no changes in that area (which of course doesn't mean there can't be some bug).

@sldfgunslinger2766
Copy link
Contributor Author

I can't reproduce this. Shift-clicking twists the torso and left-clicking on some unit targets it. I know of no changes in that area (which of course doesn't mean there can't be some bug).

Right on, maybe I'm just missing something with the torso twist. I've always used the tab at the bottom to choose a twist facing That said, the default left click to target a unit is the main issue.

@HammerGS
Copy link
Member

HammerGS commented May 2, 2021

Out of curiosity, did anyone having the issue copy their mmconfig folder over to the new version?

@sldfgunslinger2766
Copy link
Contributor Author

I do tend to copy over a couple of files in mmconf from version to version. But, the log I posted above is from a fresh download of the 49 dev from the website.

@Tecmes
Copy link

Tecmes commented May 3, 2021

Fresh install for me, but I did load a MM prefs from a version saved from 0.48.

@HoneySkull
Copy link
Collaborator

Could Pull Request #2809 have impacted this? I haven't been able to connect it, but it's plausible.

@HoneySkull
Copy link
Collaborator

HoneySkull commented May 3, 2021

I've confirmed this is caused by #2809. You can see in version 0.48 stable when you left click a target (or other hex) and you hold down the mouse button, a light blue hex boarder appears, and then when you let go of the left mouse button (button up) the unit/hex becomes targeted with a dark blue hex.

After #2809 was merged, when you left mouse button click, it's like it's only registering the left mouse down but NOT the left mouse up event. This makes sense since I replaced the deprecated BUTTON1_MASK with BUTTON1_DOWN_MASK as per the JDK11 Swing suggestion. I'm guessing there is some difference in processing the extended modifiers from the new getModifiersEx() over the deprecated getModifiers().

@NickAragua
Copy link
Member

Let's let that be a lesson to us all to be wary of willy-nilly replacing deprecated code without testing what it affects.

@HoneySkull
Copy link
Collaborator

Guilty as charged! Should I roll back the KeyEvent upgrade (#2809) from master and continue to work on the testing/fixing in private or leave it in master and continue to test/fix. I see @NickAragua has offered a fix - Thank you!

@Windchild292
Copy link
Contributor

Leave it, Nick's got a fix open for the issue and the overall swapover is an improvement

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 a pull request may close this issue.

7 participants