🐛 fix(MainWindow.py): fix bug where graph settings were not being saved when the number of graphs was changed

 feat(MainWindow.py): add functionality to save graph settings when the number of graphs is changed
The bug was caused by the fact that the graph settings were not being saved when the number of graphs was changed. This was fixed by adding code to save the graph settings when the number of graphs is changed. The new functionality allows the user to change the number of graphs and have the graph settings saved.
This commit is contained in:
Djalim Simaila 2023-05-02 10:25:09 +02:00
parent ef1cf64759
commit bb6f078ec2

View File

@ -156,11 +156,6 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
return
if not self.check_output_folder():
return
settings = SettingManager.get_instance()
for count,_ in enumerate(self.slots):
self.slots[count][1] = self.combo_boxes[count].currentText()
settings.set_last_graph(count,self.slots[count][1])
self.clear_graphs()
self.completed_tasks = 0
@ -390,4 +385,9 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
for combo_box in self.combo_boxes:
if combo_box.currentIndex() != 0:
self.graph_nb += 1
self.graph_nb_spinbox.setValue(self.graph_nb)
self.graph_nb_spinbox.setValue(self.graph_nb)
settings = SettingManager.get_instance()
for count,_ in enumerate(self.slots):
self.slots[count][1] = self.combo_boxes[count].currentText()
settings.set_last_graph(count,self.slots[count][1])