Optimizations and fixes on the new profile.

This patch optimizes a few items when hitting the
'save preferences' dialog, since when a preference is
modified, all the items try to reload their visual
based on wether a preference changed or not, the correct
code for 'hey, my pref changed, let's update' needed
to be done.

now the axis will only set a new maximum if it's different
from the old one ( and thus, going to a new dive with
the same maxdepth or maxtime as the old one will not touch
their axis, not triggering gratuitous animations. )

also, the 'incr by 3m' was not being called - it seems
that our 'syncsettings' method is not storing things on
the 'prefs' global var. I added just for the incr by 3m
case, but it's something that we need to check later.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-02-04 19:21:57 -02:00 committed by Dirk Hohndel
parent 25b0a846af
commit 7b9400685d
5 changed files with 18 additions and 4 deletions

View file

@ -471,9 +471,8 @@ void DiveCalculatedCeiling::preferencesChanged()
if ( dataModel && is3mIncrement != shouldShow3mIncrement){
// recalculate that part.
dataModel->calculateDecompression();
is3mIncrement = shouldShow3mIncrement;
}
is3mIncrement = shouldShow3mIncrement;
setVisible(s.value("calcceiling").toBool());
}