forked from M-Labs/artiq
1
0
Fork 0

scanwidget: min 3 ticks (f3b4cb2)

This commit is contained in:
Robert Jördens 2016-03-17 00:30:13 +01:00
parent a4e916de73
commit 61223fb053
1 changed files with 2 additions and 2 deletions

View File

@ -173,8 +173,8 @@ class ScanWidget(QtWidgets.QWidget):
if center: if center:
scale = min(scale, self.dynamicRange/abs(center)) scale = min(scale, self.dynamicRange/abs(center))
left = a*scale/b left = a*scale/b
self.ticker.min_ticks = int(ev.size().width() / self.ticker.min_ticks = max(
(2.5*self._labelSize.width())) 3, int(ev.size().width()/(2.5*self._labelSize.width())))
self._setView(left, scale) self._setView(left, scale)
def paintEvent(self, ev): def paintEvent(self, ev):