#2657 Make ensemble curve set legends appear in snapshot images

This commit is contained in:
Jacob Støren
2018-04-20 18:37:27 +02:00
parent 48814e33c4
commit 977fe0fb96

View File

@@ -1110,6 +1110,8 @@ void RimSummaryPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
//--------------------------------------------------------------------------------------------------
QImage RimSummaryPlot::snapshotWindowContent()
{
#if 0
// This does not work with the color legend widgets. Is there a reason for doing this, and not to grab the widget ?
QImage image;
if (m_qwtPlot)
@@ -1124,6 +1126,16 @@ QImage RimSummaryPlot::snapshotWindowContent()
plotRenderer.render(m_qwtPlot, &painter, rect);
}
return image;
#endif
QImage image;
if (m_qwtPlot)
{
QPixmap pix = QPixmap::grabWidget(m_qwtPlot);
image = pix.toImage();
}
return image;
}