mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 08:22:24 -04:00
Add unused add_button method
This commit is contained in:
parent
5a4043524a
commit
0c3fad7386
1 changed files with 6 additions and 0 deletions
|
@ -72,6 +72,12 @@ class Models(QDialog):
|
|||
f.modelsList.setCurrentRow(0)
|
||||
maybeHideClose(box)
|
||||
|
||||
def add_button(self, label: str, func: Callable[Any, None]) -> None:
|
||||
box = self.form.buttonBox
|
||||
|
||||
button = box.addButton(_(label), QDialogButtonBox.ActionRole)
|
||||
qconnect(button.clicked, func)
|
||||
|
||||
def onRename(self) -> None:
|
||||
nt = self.current_notetype()
|
||||
txt = getText(_("New name:"), default=nt["name"])
|
||||
|
|
Loading…
Reference in a new issue