Planner: reset GFlow and GFhigh when we're done

While planning we might change the gradient factors. Make sure they are
back to what's in the preferences when we're done planning.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-06-10 09:11:34 -07:00
parent ecb5f4c792
commit 6daeb276ad

View file

@ -336,6 +336,10 @@ void DivePlannerPointsModel::setPlanMode(Mode m)
mode = m;
if (m == NOTHING)
stagingDive = NULL;
// the planner may reset our GF settings that are used to show deco
// reset them to what's in the preferences
if (m != PLAN)
set_gf(prefs.gflow, prefs.gfhigh, prefs.gf_low_at_maxdepth);
}
bool DivePlannerPointsModel::isPlanner()