- Fixed a division by zero when updating step size

pull/36/head
Rune B. Broberg 2019-10-08 23:11:13 +02:00
rodzic a4bd7d9db0
commit 5d3b159e13
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -839,8 +839,9 @@ class NanoVNASaver(QtWidgets.QWidget):
return
if self.sweepCountInput.text().isdigit():
segments = int(self.sweepCountInput.text())
fstep = fspan / (segments * 101)
self.sweepStepLabel.setText(self.formatShortFrequency(fstep) + "/step")
if segments > 0:
fstep = fspan / (segments * 101)
self.sweepStepLabel.setText(self.formatShortFrequency(fstep) + "/step")
@staticmethod
def formatFrequency(freq):