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

Mouse clicks registered in wrong place under OSX with HiDPI mode #79

Open
ssilburn opened this issue Feb 6, 2022 · 1 comment
Open
Labels
compatibility Related to environment or dependency compatibility

Comments

@ssilburn
Copy link
Collaborator

ssilburn commented Feb 6, 2022

Adding here an issue reported by e-mail: using OSX in HiDPI mode with a retina display can cause clicks in image or CAD views in the GUI to be registered in the wrong place. I don't have any OSX machines to test this further so I don't know under what combinations of library versions this is a problem. If encountering this problem, it can be worked around by adding the following code to the on_left_click methods of the CalcamInteractorStyle2D and CalcamInteractorStyle3D classes, in file calcam/gui/vtkinteractorstyles.py:

     clickcoords = self.interactor.GetEventPosition()

     # Factor 2 re-scaling of click coordinates needed for OSX HiDPI mode
     _pxscale = 2.0
     clickcoords = [p*_pxscale for p in clickcoords]

This fix contributed by the user who reported the bug.

@ssilburn ssilburn added the compatibility Related to environment or dependency compatibility label Feb 6, 2022
@perek42
Copy link

perek42 commented Jul 28, 2022

This issue goes away when the calcam window is moved to an external screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Related to environment or dependency compatibility
Projects
None yet
Development

No branches or pull requests

2 participants