From a2ff7ef95e375d1634fe873ebc47f68f8bed48a8 Mon Sep 17 00:00:00 2001
From: Norman Heino <norman.heino@gmail.com>
Date: Mon, 20 May 2019 07:41:05 +0200
Subject: [PATCH] Perform UI updates in bulk before/after screenshot

Fixes 0000074
---
 oscar/mainwindow.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/oscar/mainwindow.cpp b/oscar/mainwindow.cpp
index 5171873f..cec80bfa 100644
--- a/oscar/mainwindow.cpp
+++ b/oscar/mainwindow.cpp
@@ -1345,10 +1345,12 @@ void MainWindow::on_actionCheck_for_Updates_triggered()
 bool toolbox_visible = false;
 void MainWindow::on_action_Screenshot_triggered()
 {
+    setUpdatesEnabled(false);
     if (daily)
         daily->hideSpaceHogs();
     toolbox_visible = ui->toolBox->isVisible();
     ui->toolBox->hide();
+    setUpdatesEnabled(true);
     QTimer::singleShot(250, this, SLOT(DelayedScreenshot()));
 }
 
@@ -1381,10 +1383,12 @@ void MainWindow::DelayedScreenshot()
     } else {
         Notify(tr("Screenshot saved to file \"%1\"").arg(QDir::toNativeSeparators(a)));
     }
+
+    setUpdatesEnabled(false);
     if (daily)
         daily->showSpaceHogs();
     ui->toolBox->setVisible(toolbox_visible);
-
+    setUpdatesEnabled(true);
 }
 
 void MainWindow::on_actionView_Oximetry_triggered()