Skip to content

Commit

Permalink
Make last exporting dialog the new legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
RumovZ committed Apr 29, 2024
1 parent 6aa49a9 commit f88f05a
Show file tree
Hide file tree
Showing 9 changed files with 444 additions and 926 deletions.
470 changes: 0 additions & 470 deletions pylib/anki/exporting.py

This file was deleted.

163 changes: 0 additions & 163 deletions pylib/tests/test_exporting.py

This file was deleted.

10 changes: 4 additions & 6 deletions qt/aqt/browser/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
from aqt import AnkiQt, gui_hooks
from aqt.editor import Editor
from aqt.errors import show_exception
from aqt.exporting import ExportDialog as LegacyExportDialog
from aqt.import_export.exporting import ExportDialog
from aqt.import_export import exporting, exporting_web
from aqt.operations.card import set_card_deck, set_card_flag
from aqt.operations.collection import redo, undo
from aqt.operations.note import remove_notes
Expand Down Expand Up @@ -916,12 +915,11 @@ def bury_selected_cards(self, checked: bool) -> None:
@no_arg_trigger
@skip_if_selection_is_empty
def _on_export_notes(self) -> None:
nids = self.selected_notes()
if not self.mw.pm.legacy_import_export():
nids = self.selected_notes()
ExportDialog(self.mw, nids=nids, parent=self)
exporting_web.ExportDialog(self.mw, nids=nids, parent=self)
else:
cids = self.selectedNotesAsCards()
LegacyExportDialog(self.mw, cids=list(cids), parent=self)
exporting.ExportDialog(self.mw, nids=nids, parent=self)

# Flags & Marking
######################################################################
Expand Down
Loading

0 comments on commit f88f05a

Please sign in to comment.