-
Notifications
You must be signed in to change notification settings - Fork 5
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
Overlay flickers on VTK cells #13
Comments
From yesterday's email:
|
Using CDMSCell and VTK 6 I still get a transparent cell, but lots of these errors:
|
This patch makes the VTK scene render correctly for me, but the overlay is not visible.
|
Well yes, the cell should not be |
I am not sure it is possible to use a Qt overlay with VTK cells. OpenGL may take ownership of that part of the screen. This may differ between platforms as you say it works on Linux. It looks like UV-CDAT is working around this by using either OpenGL-based configuration overlays and standalone qt-based configuration windows. We could remove the cell while showing the overlay like is done with the patch below. We could have a flag on the cells telling DAT if it supports overlays? diff --git a/dat/gui/cellcontainer.py b/dat/gui/cellcontainer.py
index e1b09ac..92461ef 100644
--- a/dat/gui/cellcontainer.py
+++ b/dat/gui/cellcontainer.py
@@ -215,12 +215,10 @@ def setWidget(self, widget):
self.toolBar = None
if widget:
widget.setParent(self)
- widget.show()
self.containedWidget = widget
if widget is None:
return
- widget.raise_()
self._set_toolbar_buttons(True)
self.contentsUpdated()
@@ -273,7 +271,7 @@ def contentsUpdated(self):
self._set_overlay(None)
def _set_overlay(self, overlay_class, **kwargs):
- if overlay_class is None:
+ if overlay_class is None and not self._execute_pending:
# Default overlay
if self._plot is not None and self.has_error():
self._set_overlay(VariableDroppingOverlay, overlayed=False)
@@ -302,13 +300,18 @@ def _set_overlay(self, overlay_class, **kwargs):
# Now that we are done with the overlay, we can go on with a
# deferred execution
if self._execute_pending:
- self.update_pipeline()
+ self.update_pipeline(True)
self._execute_pending = False
else:
self._overlay = overlay_class(self, **kwargs)
self._overlay_scrollarea.setWidget(self._overlay)
self._overlay.show()
self._overlay_scrollarea.raise_()
+ if self.containedWidget:
+ self.containedWidget.setParent(None)
+ self.containedWidget.deleteLater()
+ self.containedWidget = None
+ self._execute_pending = True
self.do_layout()
self._set_toolbar_buttons(None) |
There is no need for the cell to be interactive while it is behind the overlay. Removing the cell is totally acceptable, in fact it is done on the branch |
My goal was to do something similar to what is done in the spreadsheet overlay (QCellPresenter, used to move/copy cells). |
I did not get hiding the cell to work before, but I now see this is working on |
Did you push your changes? I can try it on both Linux and Mac and report back |
I pushed the changes to |
I still get a crash on OSX:
|
Which VTK version are you running? One solution I found here: http://stackoverflow.com/questions/6700615/issue-getting-vtk-to-work-with-qt |
I'm using 5.10.1 on Mac; I also filed VisTrails/VisTrails#1082 which does seem similar (same abort from VTK). |
Yep, that fixed it on my Mac! It does make the overlay code very ugly though. The branch also has to be rebased, it is based pretty far behind. |
Great! Yes, we should de-duplicate the pixmap code and fix the drag flickering. I did not want to change too much before the rebase though. Maybe we can just cherry-pick the pixmap stuff into the updated branch? |
|
Hmm no, I got it wrong... Not sure what is going on in there anymore. |
Ok I don't have this. Desperately needed though. I'm really not sure what is the issue here, it only affects VTK; is it because the viewport becomes invisible? The VisTrails spreadsheet does something similar with QCellPresenter. |
a90de6a fixes this for me. I got the flickering while moving the mouse. It also happens with non-vtk cells, but it is so fast it is not visible. Does this solve the problem? It is not clear from your video if you move the mouse during the flickering. |
(originally TRAC#21, 2013-03-20)
comment by @remram44:
comment by @remram44:
comment by dakoop:
The text was updated successfully, but these errors were encountered: