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>
This commit is contained in:
Tomaz Canabrava 2014-05-29 23:42:55 -03:00 committed by Dirk Hohndel
parent 0c6b0334c0
commit 490c7a0645

View file

@ -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()