diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-05-29 23:42:55 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-29 20:37:59 -0700 |
commit | 490c7a06458b5d51c296c497cca44e2a8d49bb2f (patch) | |
tree | 90ab47be27cbf1ca4c9ea982a5a81fea9c49323d /qt-ui/profile/profilewidget2.cpp | |
parent | 0c6b0334c00c512566a4be8a0285f06ef90a25a5 (diff) | |
download | subsurface-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.cpp | 5 |
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() |