From 6d81c0ea72d2850e87ab3e053f3477926aa6775a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Jensen?= Date: Thu, 30 Nov 2017 12:11:57 +0100 Subject: [PATCH] Statistics dialog. Do not include snapshot when dialog is not open --- .../ProjectDataModel/Rim3dOverlayInfoConfig.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp index 9e9e0f3aac..de2b0aa6f4 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp +++ b/ApplicationCode/ProjectDataModel/Rim3dOverlayInfoConfig.cpp @@ -219,20 +219,11 @@ QString Rim3dOverlayInfoConfig::resultInfoText(const HistogramData& histData) //-------------------------------------------------------------------------------------------------- QImage Rim3dOverlayInfoConfig::statisticsDialogScreenShotImage() { - bool isDialogOpen = m_gridStatisticsDialog->isVisible(); - if (!isDialogOpen) + if (m_gridStatisticsDialog->isVisible()) { - showStatisticsInfoDialog(false); - QApplication::processEvents(); + return m_gridStatisticsDialog->screenShotImage(); } - - QImage img = m_gridStatisticsDialog->screenShotImage(); - - if (!isDialogOpen) - { - m_gridStatisticsDialog->close(); - } - return img; + return QImage(); } //--------------------------------------------------------------------------------------------------