mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix problem with black background in snapshot export
This commit is contained in:
@@ -350,6 +350,7 @@ void RiuMultiPlotPage::renderTo( QPaintDevice* paintDevice )
|
||||
void RiuMultiPlotPage::renderTo( QPainter* painter, double scalingFactor )
|
||||
{
|
||||
setSelectionsVisible( false );
|
||||
painter->fillRect( painter->viewport(), Qt::white );
|
||||
m_plotTitle->render( painter );
|
||||
|
||||
// Subtract margins because we are rendering into part inside the margins
|
||||
|
||||
@@ -623,7 +623,6 @@ void RiuQwtPlotWidget::renderTo( QPainter* painter, const QRect& targetRect, dou
|
||||
QPoint canvasBottomRightInWindowCoords = canvasBottomRightInPlotCoords + plotTopLeftInWindowCoords;
|
||||
|
||||
QwtPlotRenderer renderer( this );
|
||||
renderer.setDiscardFlag( QwtPlotRenderer::DiscardBackground, true );
|
||||
renderer.render( this, painter, targetRect );
|
||||
static_cast<QwtPlotCanvas*>( this->canvas() )->setPaintAttribute( QwtPlotCanvas::BackingStore, true );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user