Fix editor loses focus when toggling list and copy selects wrong target deck for filtered decks (#3465)

* fix copy selects wrong target deck for filtered decks
This commit is contained in:
Shirish Pokhrel 2024-10-02 04:42:41 -04:00 committed by GitHub
parent cfd1eba7ec
commit 2ac27585b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 2 deletions

View file

@ -194,6 +194,7 @@ Gregory Abrasaldo <degeemon@gmail.com>
Taylor Obyen <162023405+taylorobyen@users.noreply.github.com>
Kris Cherven <krischerven@gmail.com>
twwn <github.com/twwn>
Shirish Pokhrel <singurty@gmail.com>
********************

View file

@ -740,7 +740,7 @@ class Browser(QMainWindow):
def on_create_copy(self) -> None:
if note := self.table.get_current_note():
deck_id = self.table.get_current_card().did
deck_id = self.table.get_current_card().current_deck_id()
aqt.dialogs.open("AddCards", self.mw).set_note(note, deck_id)
@no_arg_trigger

View file

@ -1155,7 +1155,7 @@ timerStopped = false;
def on_create_copy(self) -> None:
if self.card:
aqt.dialogs.open("AddCards", self.mw).set_note(
self.card.note(), self.card.did
self.card.note(), self.card.current_deck_id()
)
def delete_current_note(self) -> None: