Hide ruler when in ADD or PLAN mode.

This ruler shouldn't appear in ADD or PLAN mode, it's a bug
and may crash things.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-01-28 16:55:55 -02:00 committed by Dirk Hohndel
parent 64ef4c2e8d
commit ee4f9494f2

View file

@ -507,7 +507,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
// reset some item visibility on printMode changes
toolTipItem->setVisible(!printMode);
rulerItem->setVisible(prefs.rulergraph && !printMode);
rulerItem->setVisible(prefs.rulergraph && !printMode && currentState != PLAN && currentState != ADD);
if (currentState == EMPTY)
setProfileState();