Skip to content

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

@ssilburn

Description

@ssilburn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibilityRelated to environment or dependency compatibility

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions