Fix list settings interface
offlate/ui/listsettingsedit.py
| 31 | 31 | self.treeWidget.addTopLevelItems(items) | |
| 32 | 32 | ||
| 33 | 33 | def addLineSlot(self): | |
| 34 | + | d = [] | |
| 34 | 35 | for i in range(0, len(self.conf.specifications)): | |
| 35 | 36 | d.append(self.widgets[i].text()) | |
| 36 | 37 | items = [QTreeWidgetItem(d)] | |
… | |||
| 50 | 51 | data = {} | |
| 51 | 52 | j = 0 | |
| 52 | 53 | for s in specs: | |
| 53 | - | data[s.name] = item.text(j) | |
| 54 | + | data[s.key] = item.text(j) | |
| 54 | 55 | j += 1 | |
| 55 | 56 | items.append(data) | |
| 56 | 57 | return items | |
… | |||
| 70 | 71 | self.treeWidget.setColumnCount(len(self.conf.specifications)) | |
| 71 | 72 | vbox.addWidget(self.treeWidget) | |
| 72 | 73 | ||
| 74 | + | self.widgets = [] | |
| 73 | 75 | for s in self.conf.specifications: | |
| 74 | 76 | edit = QLineEdit() | |
| 75 | 77 | edit.setPlaceholderText(self.tr(s.placeholder)) | |
| 78 | + | self.widgets.append(edit) | |
| 76 | 79 | hbox.addWidget(edit) | |
| 77 | 80 | ||
| 78 | 81 | addbutton = QPushButton(self.tr("Add")) | |