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

orientation widget #133

Open
andrea-bistacchi opened this issue Feb 11, 2025 · 6 comments
Open

orientation widget #133

andrea-bistacchi opened this issue Feb 11, 2025 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@andrea-bistacchi
Copy link
Collaborator

The orientation widget in VTK views has one unexpected behavior and another problem (explained below but to be solved).

Expected to be solved: the widget is active in map and cross-section views, that are rotated if the widget axes are clicked. To solve this the widget interaction must be deactivated in these views.

Unexpected: when a 3D view is opened, the widget appears huge, and is resized after the view is resized. For some reason to be investigated, the widget size is OK in map and cross-section views.

Image

Image

@gbene
Copy link
Collaborator

gbene commented Feb 11, 2025

Hi, have you tried to comment out this line?

self.cam_orient_widget.On()

I remember that the orientation widget was a bit weird to work with and had to be turned on after the canvas was shown.
In fact there are a couple of comments for this in the code but there is this new line that turns on the widget before the canvas is shown. Maybe it got there during the refactoring (?)

@andrea-bistacchi
Copy link
Collaborator Author

Yes, I tried. It appears that turning it on after the canvas is shown results in the widget not being shown.

The really weird thing is the different behavior of 3D and 2D views, that are actually 3D with a different projection... in "2D" the widget is OK.

So I suspect that the problem comes from something we set in the 3D view specifically.

@r-monti14
Copy link
Collaborator

The widget has a size issue in the 2D views too, but it doesn't occur when opening more than one window. For instance, if you open a section as the first window, you will see the problem; then if you also open the 3D view, the issue won't occur.

@andrea-bistacchi
Copy link
Collaborator Author

Uh. Even stranger!

Is this a Qt - Pyvista problem??

@r-monti14
Copy link
Collaborator

I think that it happens because when opening more than one window, the dimension of the view is automatically resized, resizing the widget and "fixing" the problem.

@andrea-bistacchi
Copy link
Collaborator Author

Maybe this is related to some problem between pyvistaqt and PySide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants