scanwidget: protect against resize from zero

fix #839
This commit is contained in:
Robert Jördens 2017-10-11 22:25:14 +02:00
parent 375d2d587c
commit 95b3ddbaf0

View File

@ -223,7 +223,7 @@ class ScanWidget(QtWidgets.QWidget):
self._zoom(self.zoomFactor**y, ev.x())
def resizeEvent(self, ev):
if not ev.oldSize().isValid():
if not ev.oldSize().isValid() or not ev.oldSize().width():
self.viewRange()
return
self.ticker.min_ticks = max(