diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-07-21 19:10:31 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-23 07:50:03 -0700 |
commit | 65eefe7b599575bf401c0adc9c61e42bc56fc4c9 (patch) | |
tree | e01593eb7f4a089c466c35cd166971f7bae9f962 /qt-ui/profile/profilewidget2.cpp | |
parent | 82bcb1767c8ca1fdecc2bc40eb3a47fc1bd2a147 (diff) | |
download | subsurface-65eefe7b599575bf401c0adc9c61e42bc56fc4c9.tar.gz |
Animation speed is a value, not a boolean
This breaks compatibility with old preferences, but it's a single
key and not that very important so I don't think it's a bigger issue
I've renamed prefs.animation to prefs.animation_speed to denote
that it's a value, and not a state.
Also, fixed the places that were treating it as a state (on/off)
to treat it like a correct value.
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 5e9a1d8c5..a6b3564f8 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -386,10 +386,10 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) } // special handling for the first time we display things - int animSpeedBackup = -1; + int animSpeedBackup = 0; if (firstCall && MainWindow::instance()->filesFromCommandLine()) { - animSpeedBackup = prefs.animation; - prefs.animation = 0; + animSpeedBackup = prefs.animation_speed; + prefs.animation_speed = 0; firstCall = false; } @@ -518,8 +518,8 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) if ((nr = number_of_computers(&displayed_dive)) > 1) dcText += tr(" (#%1 of %2)").arg(dc_number + 1).arg(nr); diveComputerText->setText(dcText); - if (MainWindow::instance()->filesFromCommandLine() && animSpeedBackup != -1) { - prefs.animation = animSpeedBackup; + if (MainWindow::instance()->filesFromCommandLine() && animSpeedBackup != 0) { + prefs.animation_speed = animSpeedBackup; } if (currentState == ADD || currentState == PLAN) { // TODO: figure a way to move this from here. |