Correctly reload saved point size and line thickness.

0.1.4alpha
pull/55/head
Rune Broberg 2019-10-17 09:15:16 +02:00
rodzic dc8ef86d65
commit 6c4431d4b9
4 zmienionych plików z 10 dodań i 3 usunięć

Wyświetl plik

@ -807,6 +807,7 @@ class Calibration:
self.deltaE[i] = - ((g1*(gm2-gm3)-g2*gm2+g3*gm3)*gm1+(g2*gm3-g3*gm3)*gm2) / denominator
except ZeroDivisionError:
self.isCalculated = False
# TODO: Output this error more clearly to the user
logger.error("Division error - did you use the same measurement for two of short, open and load?")
return self.isCalculated

Wyświetl plik

@ -120,6 +120,7 @@ class VNA:
return []
finally:
self.app.serialLock.release()
logger.debug("VNA done reading %s (%d values)", value, len(values)-2)
return values[1:-1]
else:
logger.error("Unable to acquire serial lock to read %s", value)

Wyświetl plik

@ -607,6 +607,7 @@ class NanoVNASaver(QtWidgets.QWidget):
elif self.sweepStartInput.text() == "" or self.sweepEndInput.text() == "":
self.sweepStartInput.setText(frequencies[0])
self.sweepEndInput.setText(frequencies[100])
self.sweepStartInput.textEdited.emit(self.sweepStartInput.text())
self.sweepStartInput.textChanged.emit(self.sweepStartInput.text())
else:
logger.warning("No frequencies read")
@ -1128,7 +1129,9 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
display_options_layout.addRow("Second reference color", self.btnSecondaryReferenceColorPicker)
self.pointSizeInput = QtWidgets.QSpinBox()
self.pointSizeInput.setValue(self.app.settings.value("PointSize", 2, int))
pointsize = self.app.settings.value("PointSize", 2, int)
self.pointSizeInput.setValue(pointsize)
self.changePointSize(pointsize)
self.pointSizeInput.setMinimum(1)
self.pointSizeInput.setMaximum(10)
self.pointSizeInput.setSuffix(" px")
@ -1137,7 +1140,9 @@ class DisplaySettingsWindow(QtWidgets.QWidget):
display_options_layout.addRow("Point size", self.pointSizeInput)
self.lineThicknessInput = QtWidgets.QSpinBox()
self.lineThicknessInput.setValue(self.app.settings.value("LineThickness", 1, int))
linethickness = self.app.settings.value("LineThickness", 2, int)
self.lineThicknessInput.setValue(linethickness)
self.changeLineThickness(linethickness)
self.lineThicknessInput.setMinimum(1)
self.lineThicknessInput.setMaximum(10)
self.lineThicknessInput.setSuffix(" px")

Wyświetl plik

@ -14,5 +14,5 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
version = '0.1.3'
version = '0.1.4alpha'
debug = False