From bd6b714be102b272725d61f8675c2cff322479e7 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 25 Apr 2021 17:29:34 +0200 Subject: profile: ignore animation-speed setting when printing When printing, the animation speed was set to 0 by the caller and later reset to the original value. Instead of modifying global state, set it internally (in the profile-code) to zero when in print mode. This is another small step in making the printing independent from the shown profile. Signed-off-by: Berthold Stoeger --- desktop-widgets/printer.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/printer.cpp b/desktop-widgets/printer.cpp index 5a26ad66d..3c4a21010 100644 --- a/desktop-widgets/printer.cpp +++ b/desktop-widgets/printer.cpp @@ -128,7 +128,6 @@ void Printer::render(int pages) // keep original preferences ProfileWidget2 *profile = MainWindow::instance()->graphics; int profileFrameStyle = profile->frameStyle(); - int animationOriginal = qPrefDisplay::animation_speed(); double fontScale = profile->getFontPrintScale(); double printFontScale = 1.0; @@ -136,7 +135,6 @@ void Printer::render(int pages) profile->setFrameStyle(QFrame::NoFrame); profile->setPrintMode(true, !printOptions.color_selected); profile->setToolTipVisibile(false); - qPrefDisplay::set_animation_speed(0); // render the Qwebview QPainter painter; @@ -190,7 +188,6 @@ void Printer::render(int pages) profile->setFontPrintScale(fontScale); profile->setToolTipVisibile(true); profile->resize(originalSize); - qPrefDisplay::set_animation_speed(animationOriginal); //replot the dive after returning the settings profile->plotDive(current_dive, dc_number, true); -- cgit v1.2.3-70-g09d2