aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-05-29 23:42:55 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-29 20:37:59 -0700
commit490c7a06458b5d51c296c497cca44e2a8d49bb2f (patch)
tree90ab47be27cbf1ca4c9ea982a5a81fea9c49323d /qt-ui/profile/profilewidget2.cpp
parent0c6b0334c00c512566a4be8a0285f06ef90a25a5 (diff)
downloadsubsurface-490c7a06458b5d51c296c497cca44e2a8d49bb2f.tar.gz
Hide DiveHandlers and GasTexts when on profile mode too.
When switching from PLAN or ADD mode to PROFILE, we kept the dive handlers visible, not anymore. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r--qt-ui/profile/profilewidget2.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index df45628d6..3a5d17664 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -756,6 +756,11 @@ void ProfileWidget2::setProfileState()
}
}
rulerItem->setVisible(prefs.rulergraph);
+ #define HIDE_ALL(TYPE, CONTAINER) \
+ Q_FOREACH (TYPE *item, CONTAINER) item->setVisible(false);
+ HIDE_ALL(DiveHandler, handles);
+ HIDE_ALL(QGraphicsSimpleTextItem, gases);
+ #undef HIDE_ALL
}
void ProfileWidget2::setAddState()