Skip to content
Snippets Groups Projects
Commit 721c9d3b authored by Ivo Peterek's avatar Ivo Peterek
Browse files

FIX: yLabel units in config file #2

parent a65975d1
No related branches found
No related tags found
No related merge requests found
......@@ -735,12 +735,14 @@ class Ui_TabWidget(object):
config_file.write("root_folder = [('"+self.data_path+"', None)]\n\n")
config_file.write("main_reg = [{'" + self.comboBox_MainRegion.currentText() + "': '" + self.comboBox_MainRegion.currentText() + "'}]\n\n")
#TODO: chybi vyber jednotky pro ylabel
for i, item in enumerate(self.selected_y_labels):
unit = ''
if item.text(0).find("[") != -1 and item.text(0).find("]") != -1:
unit = item.text(0)[item.text(0).find("[")+1:item.text(0).find("]")]
if i == 0:
config_file.write("y_label = ordDict((('" + item.parent().text(0) + "', [('" + item.text(0) + "', '')])")
config_file.write("y_label = ordDict((('" + item.parent().text(0) + "', [('" + item.text(0) + "', '" + unit + "')])")
else:
config_file.write(",\n('" + item.parent().text(0) + "', [('" + item.text(0) + "', '')])")
config_file.write(",\n('" + item.parent().text(0) + "', [('" + item.text(0) + "', '" + unit + "')])")
config_file.write("))\n\n")
if self.checkBox_time_energy_vars.isChecked():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment