summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--profile-widget/diveprofileitem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp
index 9f648c2f0..4e7cc0a36 100644
--- a/profile-widget/diveprofileitem.cpp
+++ b/profile-widget/diveprofileitem.cpp
@@ -163,7 +163,6 @@ int DiveProfileItem::maxCeiling(int row)
void DiveProfileItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{
bool eventAdded = false;
- (void)eventAdded;
if (!shouldCalculateStuff(topLeft, bottomRight))
return;
@@ -175,7 +174,9 @@ void DiveProfileItem::modelDataChanged(const QModelIndex &topLeft, const QModelI
reported_ceiling_in_red = prefs.redceiling;
profileColor = getColor(DEPTH_BOTTOM);
-#ifndef SUBSURFACE_MOBILE
+#ifdef SUBSURFACE_MOBILE
+ Q_UNUSED(eventAdded);
+#else
int currState = qobject_cast<ProfileWidget2 *>(scene()->views().first())->currentState;
if (currState == ProfileWidget2::PLAN) {
plot_data *entry = dataModel->data().entry;