-
Notifications
You must be signed in to change notification settings - Fork 13
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
Closing a canvas does not work properly if more than one canvas is open. #21
Comments
@doutriaux1 @aashish24 Do you have any ideas on this? I've seen this while working on vcs.js. |
Related issues I think: |
@doutriaux1 @aashish24 @chaosphere2112 This is related to the interactor attached to the render window. Without this, windows close fine. There is a way to make this work - @chaosphere2112 might already have the code. |
that would be in vcs-js. I think for the pure vcs, we may still have this issue. Is that correct? |
@aashish24 pure vcs still creates an interactor if we run in foreground mode. So the problem affects both vcs.js and vcs. |
@chaosphere2112 @doutriaux1 @aashish24 The problem is in configurator.py
Commenting out |
Ah! My code doesn't put it in Interact mode, which is why it closes correctly (I just proxy events manually to the vtkRenderWindowInteractor) |
@danlipsa Actually, looks like it works regardless on my mac. Tried:
and everything closed properly. |
@chaosphere2112 Does the following work? So, the first window has to close, then the second window has to close. import vcs y.interact() |
@danlipsa @chaosphere2112 I do recall an instance in the distant past (and admittedly on a devel version) that the handles got tangled, so that I had two canvases open, but when I closed the first one opened, the second one locked, or some similar situation.. It would be great to augment any existing tests to make sure similar issues aren't happening as shared objects are "locking" the ability to deal with each independent canvas.. |
Seems to work (though the second call to interact() doesn’t actually Start() the interactor as far as I can tell, the widgets do show up from the call to configure()) From: Dan Lipsa <[email protected]mailto:[email protected]> @chaosphere2112https://github.com/chaosphere2112 Does the following work? So, the first window has to close, then the second window has to close. import vcs y.interact() — |
@chaosphere2112 @doutriaux1 @aashish24 Indeed this works on mac. I have to press "Open Configure" first to get the interactor to receive the key Q I press but it does close one window at a time. So this seems to be a difference between vtkXOpenGLRenderWindow and vtkCocoaRenderWindow. I have not been able to reproduce it using a VTK only example. |
@chaosphere2112 @aashish24 @doutriaux1 In this case, I'll stop working on this. The reason why I wanted to get this working is because of vcs.js. The question remains: Should we keep the "configure" interface or should we strip it? I would vote to strip it - it provides very limited functionality, and creates maintenance problems like this one. The following image is a reminder of what this interface does: |
I can see this is used in the 3D plots. We can still keep it there. |
@scottwittenburg it appears |
Possible duplicated of (or at least related to) #403. |
The following script opens 4 canvases, plots the same fillarea and closes the canvases one at a time.
The canvases get cleared but not closed. This does not work on Linux but works on Mac.
If we replace .interact() with .backend.interact() everything works fine.
The text was updated successfully, but these errors were encountered: