diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | desktop-widgets/divelogexportdialog.cpp | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c0255b65..49d4654bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +Export: when exporting dive sites in dive site mode, export selected dive sites [#2275] Mobile: fix several bugs in the handling of incorrect or unverified cloud credentials Mobile: try to adjust the UI for cases with large default font relative to screen size --- diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp index 2b1409aea..e44f2280d 100644 --- a/desktop-widgets/divelogexportdialog.cpp +++ b/desktop-widgets/divelogexportdialog.cpp @@ -133,6 +133,17 @@ void DiveLogExportDialog::on_exportGroup_buttonClicked(QAbstractButton*) static std::vector<const dive_site *> getDiveSitesToExport(bool selectedOnly) { std::vector<const dive_site *> res; + + if (selectedOnly && MultiFilterSortModel::instance()->diveSiteMode()) { + // Special case in dive site mode: export all selected dive sites, + // not the dive sites of selected dives. + QVector<dive_site *> sites = MultiFilterSortModel::instance()->filteredDiveSites(); + res.reserve(sites.size()); + for (const dive_site *ds: sites) + res.push_back(ds); + return res; + } + res.reserve(dive_site_table.nr); for (int i = 0; i < dive_site_table.nr; i++) { struct dive_site *ds = get_dive_site(i, &dive_site_table); |