work around 'which deck would you like' sticking around on Qt6/macOS

Not a problem on Qt5, and not really sure why this works 🤷
This commit is contained in:
Damien Elmes 2021-12-06 17:14:09 +10:00
parent d515939340
commit cee57f4cb7

View file

@ -89,8 +89,8 @@ def _deck_prompt_dialog(decks: list[DeckDict]) -> None:
box.addWidget(QLabel(tr.deck_config_which_deck()))
for deck in decks:
button = QPushButton(deck["name"])
qconnect(button.clicked, lambda _, deck=deck: display_options_for_deck(deck))
qconnect(button.clicked, diag.close)
qconnect(button.clicked, lambda _, deck=deck: display_options_for_deck(deck))
box.addWidget(button)
button = QPushButton(tr.actions_cancel())
qconnect(button.clicked, diag.close)