Fix list settings interface

Julien LepillerSun Dec 13 01:55:28+0100 2020

6f8ea2b

Fix list settings interface

offlate/ui/listsettingsedit.py

3131
        self.treeWidget.addTopLevelItems(items)
3232
3333
    def addLineSlot(self):
34+
        d = []
3435
        for i in range(0, len(self.conf.specifications)):
3536
            d.append(self.widgets[i].text())
3637
        items = [QTreeWidgetItem(d)]

5051
            data = {}
5152
            j = 0
5253
            for s in specs:
53-
                data[s.name] = item.text(j)
54+
                data[s.key] = item.text(j)
5455
                j += 1
5556
            items.append(data)
5657
        return items

7071
        self.treeWidget.setColumnCount(len(self.conf.specifications))
7172
        vbox.addWidget(self.treeWidget)
7273
74+
        self.widgets = []
7375
        for s in self.conf.specifications:
7476
            edit = QLineEdit()
7577
            edit.setPlaceholderText(self.tr(s.placeholder))
78+
            self.widgets.append(edit)
7679
            hbox.addWidget(edit)
7780
7881
        addbutton = QPushButton(self.tr("Add"))