1
0
forked from IPKM/nmreval

pick position remembers selected destination graph; closes #62

This commit is contained in:
Dominik Demuth
2023-05-14 18:16:23 +02:00
parent 45d319834b
commit 753cd06dd1
2 changed files with 15 additions and 1 deletions

View File

@ -187,9 +187,15 @@ class PointSelectWidget(QtWidgets.QWidget, Ui_Form):
self.peaktable.blockSignals(False)
def set_graphs(self, graphs: list):
last_graph = self.graph_combobox.currentData()
self.graph_combobox.clear()
for g in graphs:
idx = 0
for i, g in enumerate(graphs):
self.graph_combobox.addItem(g[1], userData=g[0])
if g[0] == last_graph:
idx = i
self.graph_combobox.setCurrentIndex(idx)
@QtCore.pyqtSlot(int, name='on_graph_checkbox_stateChanged')
def changed_state(self, checked):