mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
82bcb1767c
commit
65eefe7b59
6 changed files with 18 additions and 18 deletions
|
@ -122,14 +122,14 @@ int PrintLayout::estimateTotalDives() const
|
|||
void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
|
||||
{
|
||||
int i, row = 0, col = 0, printed = 0, total = estimateTotalDives();
|
||||
bool animationOriginal = prefs.animation;
|
||||
int animationOriginal = prefs.animation_speed;
|
||||
|
||||
struct dive *dive;
|
||||
if (!total)
|
||||
return;
|
||||
|
||||
// disable animations on the profile:
|
||||
prefs.animation = false;
|
||||
prefs.animation_speed = 0;
|
||||
|
||||
// setup a painter
|
||||
QPainter painter;
|
||||
|
@ -223,7 +223,7 @@ void PrintLayout::printProfileDives(int divesPerRow, int divesPerColumn)
|
|||
// we need to force a redraw of the profile so it switches back from print mode
|
||||
profile->plotDive(0, true);
|
||||
// re-enable animations
|
||||
prefs.animation = animationOriginal;
|
||||
prefs.animation_speed = animationOriginal;
|
||||
}
|
||||
|
||||
/* we create a table that has a fixed height, but can stretch to fit certain width */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue