mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 00:36:38 -04:00
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:
parent
24b451b0e4
commit
90128cf2d5
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue