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
......@@ -381,8 +381,9 @@ class QVTKRenderWindowInteractor(QVTKRWIBaseClass):
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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment