Skip to content

Commit

Permalink
Fix editor loses focus when toggling list and copy selects wrong targ…
Browse files Browse the repository at this point in the history
…et deck for filtered decks (#3465)

* fix copy selects wrong target deck for filtered decks
  • Loading branch information
Shirish Pokhrel authored Oct 2, 2024
1 parent cfd1eba commit 2ac2758
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -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>

********************

Expand Down
2 changes: 1 addition & 1 deletion qt/aqt/browser/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ def onHelp(self) -> None:

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
Expand Down
2 changes: 1 addition & 1 deletion qt/aqt/reviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ def forget_current_card(self) -> None:
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:
Expand Down

0 comments on commit 2ac2758

Please sign in to comment.