Statistics dialog. Do not include snapshot when dialog is not open

This commit is contained in:
Bjørn Erik Jensen 2017-11-30 12:11:57 +01:00
parent 6fc888d718
commit 6d81c0ea72

View File

@ -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();
}
//--------------------------------------------------------------------------------------------------