Fixed the mouse marker after updating the way markers are handling.

"Mouse marker" frequency can now be entered in the field as well.
pull/12/head
Rune B. Broberg 2019-09-10 15:16:18 +02:00
rodzic c403297229
commit 35823a6234
2 zmienionych plików z 6 dodań i 2 usunięć

Wyświetl plik

@ -230,6 +230,7 @@ class PhaseChart(Chart):
f = self.fstart + absx * step
# self.mouselocation = f
self.markers[0].setFrequency(str(round(f)))
self.markers[0].frequencyInput.setText(str(round(f)))
else:
self.mouselocation = 0
return
@ -415,6 +416,7 @@ class VSWRChart(Chart):
f = self.fstart + absx * step
# self.mouselocation = f
self.markers[0].setFrequency(str(round(f)))
self.markers[0].frequencyInput.setText(str(round(f)))
else:
self.mouselocation = 0
return
@ -558,6 +560,7 @@ class PolarChart(Chart):
minimum_position = positions.index(min(positions))
self.markers[0].setFrequency(str(round(target[minimum_position].freq)))
self.markers[0].frequencyInput.setText(str(round(target[minimum_position].freq)))
return
@ -706,6 +709,7 @@ class SmithChart(Chart):
minimum_position = positions.index(min(positions))
self.markers[0].setFrequency(str(round(target[minimum_position].freq)))
self.markers[0].frequencyInput.setText(str(round(target[minimum_position].freq)))
return
@ -880,6 +884,7 @@ class LogMagChart(Chart):
f = self.fstart + absx * step
# self.mouselocation = f
self.markers[0].setFrequency(str(round(f)))
self.markers[0].frequencyInput.setText(str(round(f)))
else:
self.mouselocation = 0
return

Wyświetl plik

@ -212,10 +212,9 @@ class NanoVNASaver(QtWidgets.QWidget):
for c in self.charts:
c.setMarkers(self.markers)
self.mousemarker_frequency_label = QtWidgets.QLabel("")
label, layout = mouse_marker.getRow()
marker_control_layout.addRow(label, layout)
mouse_marker.frequencyInput.setDisabled(True)
#mouse_marker.frequencyInput.setDisabled(True)
marker_column.addWidget(marker_control_box)
marker_column.addWidget(self.markers[1].getGroupBox())