mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-23 23:13:39 -06:00
Statistics dialog. Do not include snapshot when dialog is not open
This commit is contained in:
parent
6fc888d718
commit
6d81c0ea72
@ -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();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user