summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveStatistics.cpp3
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp15
2 files changed, 1 insertions, 17 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
index dacb01721..0cf3befd2 100644
--- a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
@@ -97,10 +97,9 @@ void TabDiveStatistics::updateData()
ui->timeLimits->setMinimum("");
}
- QVector<QPair<QString, int> > gasUsed;
+ QVector<QPair<QString, int> > gasUsed = selectedDivesGasUsed();
QString gasUsedString;
volume_t vol;
- selectedDivesGasUsed(gasUsed);
for (int j = 0; j < MAX_CYLINDERS; j++) {
if (gasUsed.isEmpty())
break;
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index dbb83f356..d1f13dd13 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -542,21 +542,6 @@ void MainTab::updateDiveInfo(bool clear)
int mean[MAX_CYLINDERS], duration[MAX_CYLINDERS];
per_cylinder_mean_depth(&displayed_dive, select_dc(&displayed_dive), mean, duration);
- // now let's get some gas use statistics
- QVector<QPair<QString, int> > gasUsed;
- QString gasUsedString;
- volume_t vol;
- selectedDivesGasUsed(gasUsed);
- for (int j = 0; j < MAX_CYLINDERS; j++) {
- if (gasUsed.isEmpty())
- break;
- QPair<QString, int> gasPair = gasUsed.last();
- gasUsed.pop_back();
- vol.mliter = gasPair.second;
- gasUsedString.append(gasPair.first).append(": ").append(get_volume_string(vol, true)).append("\n");
- }
- if (!gasUsed.isEmpty())
- gasUsedString.append("...");
volume_t o2_tot = {}, he_tot = {};
selected_dives_gas_parts(&o2_tot, &he_tot);