mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add preview mode to multi plots
* Apply margins matching the Page Layout so the plot is a preview of the PDF output * Currently not a user setting, just switched off for plots based on MultiPlotPage and on for plots based on MultiPlotWindow
This commit is contained in:
@@ -105,7 +105,9 @@ void RicSnapshotViewToFileFeature::savePlotPDFReportAs( const QString& fileName,
|
||||
pdfPrinter.setCreator( QCoreApplication::applicationName() );
|
||||
pdfPrinter.setResolution( resolution );
|
||||
QRect widgetRect = plot->viewWidget()->contentsRect();
|
||||
if ( dynamic_cast<RimMultiPlotWindow*>( plot ) )
|
||||
|
||||
RimMultiPlotWindow* multiPlot = dynamic_cast<RimMultiPlotWindow*>( plot );
|
||||
if ( multiPlot && multiPlot->previewModeEnabled() )
|
||||
{
|
||||
QRect pageRect = pdfPrinter.pageLayout().fullRectPixels( resolution );
|
||||
plot->viewWidget()->resize( pageRect.size() );
|
||||
|
||||
Reference in New Issue
Block a user