Fix the lambda function for changing the mapping of the fields

The connect signal passes a bool to the given function by default, we need to ignore it.

use underscore for the sake of idiomology
This commit is contained in:
noobie 2016-10-19 20:32:27 +02:00
parent 24b451b0e4
commit 90128cf2d5

View file

@ -225,7 +225,7 @@ you can enter it here. Use \\t to represent tab."""),
self.grid.addWidget(QLabel(text), num, 1) self.grid.addWidget(QLabel(text), num, 1)
button = QPushButton(_("Change")) button = QPushButton(_("Change"))
self.grid.addWidget(button, num, 2) self.grid.addWidget(button, num, 2)
button.clicked.connect(lambda s=self,n=num: s.changeMappingNum(n)) button.clicked.connect(lambda _, s=self,n=num: s.changeMappingNum(n))
def changeMappingNum(self, n): def changeMappingNum(self, n):
f = ChangeMap(self.mw, self.importer.model, self.mapping[n]).getField() f = ChangeMap(self.mw, self.importer.model, self.mapping[n]).getField()