mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2657 Make ensemble curve set legends appear in snapshot images
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user