Skip to content
Snippets Groups Projects
Commit f2c2f20d authored by David Gobbi's avatar David Gobbi
Browse files

Use pixel scale for resize in Python Qt interactor

The device pixel scale (for retina etc.) was being used for all
events except for the resize event.  As a result, resizing on a
retina screen caused the rendering to continually flash between
proper size and half size.
parent 701b69a8
No related branches found
No related tags found
No related merge requests found
......@@ -381,8 +381,9 @@ class QVTKRenderWindowInteractor(QVTKRWIBaseClass):
self._Iren.Render()
def resizeEvent(self, ev):
w = self.width()
h = self.height()
scale = self._getPixelRatio()
w = int(round(scale*self.width()))
h = int(round(scale*self.height()))
vtkRenderWindow.SetSize(self._RenderWindow, w, h)
self._Iren.SetSize(w, h)
self._Iren.ConfigureEvent()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment