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

Points placed incorrectly with the 'p' shortcut when display scaling is >100 #156

Closed
muratmaga opened this issue May 6, 2021 · 3 comments
Assignees

Comments

@muratmaga
Copy link
Collaborator

To reproduce:

  1. Enable the SlicerMorph preferences (for p shortcut to work)
  2. Set the display scaling to more than 100%
  3. Restart slicer and load MRHead
  4. Press p to place a landmark and note that there is a distinct offset between where the point is placed and where the cursor is actually is

Reproduces for me all the with my Windows 10 laptop with 4K screen.

@pieper
Copy link
Collaborator

pieper commented May 6, 2021

To clarify, this is on windows? Which version? And which version of Slicer(Morph)?

@muratmaga
Copy link
Collaborator Author

Last version of SlicerMorph with latest stable.
In mac it happens all the time (as far as we can test on Sara's Mac).

@pieper
Copy link
Collaborator

pieper commented May 6, 2021

This looks like a long-running issue in Qt. Looks like it should be fixed in our version but maybe not.

The code we use relies on qt to do this mapping:

    cursorPosition = qt.QCursor.pos()
    widget = slicer.app.widgetAt(cursorPosition)
    mousePosition = widget.mapFromGlobal(cursorPosition)

so we could dig around to try to find a workaround, but it looks like a pretty deep problem.

The other option would be to capture the event at the vtk level instead of Qt. This would mean you need to click in the render window to give it focus before you can place with the p key.

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

No branches or pull requests

2 participants