From cd0d73a1a21d1e4baa47f492818cb7a23e4b0c45 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(