From 490c7a06458b5d51c296c497cca44e2a8d49bb2f Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 29 May 2014 23:42:55 -0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qt-ui') 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() -- cgit v1.2.3-70-g09d2