From 95b3ddbaf0e23b52c9fcd22bb3e237ccf37b090f Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Wed, 11 Oct 2017 22:25:14 +0200 Subject: [PATCH] scanwidget: protect against resize from zero fix #839 --- artiq/gui/scanwidget.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/gui/scanwidget.py b/artiq/gui/scanwidget.py index 17ed5c8a3..20e161d97 100644 --- a/artiq/gui/scanwidget.py +++ b/artiq/gui/scanwidget.py @@ -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(