summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/simplewidgets.cpp6
-rw-r--r--desktop-widgets/simplewidgets.h1
-rw-r--r--desktop-widgets/tab-widgets/TabDiveStatistics.cpp3
3 files changed, 10 insertions, 0 deletions
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp
index ceddf691c..992c681f3 100644
--- a/desktop-widgets/simplewidgets.cpp
+++ b/desktop-widgets/simplewidgets.cpp
@@ -128,6 +128,12 @@ void MinMaxAvgWidget::overrideMaxToolTipText(const QString &newTip)
d->maxValue->setToolTip(newTip);
}
+void MinMaxAvgWidget::setAvgVisibility(const bool visible)
+{
+ d->avgIco->setVisible(visible);
+ d->avgValue->setVisible(visible);
+}
+
RenumberDialog *RenumberDialog::instance()
{
static RenumberDialog *self = new RenumberDialog(MainWindow::instance());
diff --git a/desktop-widgets/simplewidgets.h b/desktop-widgets/simplewidgets.h
index ac98414a0..c804bd738 100644
--- a/desktop-widgets/simplewidgets.h
+++ b/desktop-widgets/simplewidgets.h
@@ -43,6 +43,7 @@ public:
void overrideMinToolTipText(const QString &newTip);
void overrideAvgToolTipText(const QString &newTip);
void overrideMaxToolTipText(const QString &newTip);
+ void setAvgVisibility(const bool visible);
void clear();
private:
diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
index 6a7edcee4..661aecfdc 100644
--- a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
@@ -50,6 +50,9 @@ void TabDiveStatistics::updateData()
// deepest and shallowest dive - let's just not set it
// ui->depthLimits->setAverage(get_depth_string(stats_selection.avg_depth, true));
+ // Also hide the avgIco, so its clear that its not there.
+ ui->depthLimits->overrideAvgToolTipText("");
+ ui->depthLimits->setAvgVisibility(false);
if (stats_selection.max_sac.mliter)
ui->sacLimits->setMaximum(get_volume_string(stats_selection.max_sac, true).append(tr("/min")));