mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 15:10:22 -05:00
Clean up PDF snapshots a bit
This commit is contained in:
1 parent
7c9b9705b7
commit
44488996f3
3 files changed
+10
-11
No files matched your search
@@ -91,11 +91,6 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
|
||||
RiuMainWindow* mainWnd = RiuMainWindow::instance();
|
||||
CVF_ASSERT( mainWnd );
|
||||
|
||||
// QByteArray curState = mainWnd->dockManager()->saveState( 0 );
|
||||
// mainWnd->dockManager()->restoreState( RiuDockWidgetTools::defaultDockState( RiuDockWidgetTools::dockStateHideAll3DWindowName() ) );
|
||||
|
||||
// QApplication::processEvents();
|
||||
|
||||
QString absolutePathToSnapshotDir = RicfCommandFileExecutor::instance()->getExportPath( RicfCommandFileExecutor::ExportType::SNAPSHOTS );
|
||||
|
||||
if ( !m_exportFolder().isEmpty() )
|
||||
@@ -147,9 +142,5 @@ caf::PdmScriptResponse RicfExportSnapshots::execute()
|
||||
fileSuffix );
|
||||
}
|
||||
|
||||
QApplication::processEvents();
|
||||
|
||||
// mainWnd->dockManager()->restoreState( curState );
|
||||
|
||||
return caf::PdmScriptResponse();
|
||||
}
|
||||
@@ -113,10 +113,17 @@ void RicSnapshotViewToFileFeature::savePlotPdfReportAs( const QString& fileName,
|
||||
else
|
||||
{
|
||||
QRect pageRect = pdfPrinter.pageLayout().paintRectPixels( resolution );
|
||||
viewWidget->resize( pageRect.size() );
|
||||
viewWidget->setFixedSize( pageRect.size() );
|
||||
plot->renderWindowContent( &pdfPrinter );
|
||||
viewWidget->setMinimumSize( 0, 0 );
|
||||
viewWidget->setMaximumSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX );
|
||||
viewWidget->resize( widgetRect.size() );
|
||||
}
|
||||
|
||||
if ( multiPlot )
|
||||
{
|
||||
multiPlot->updateLayout();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -196,7 +196,8 @@ void RimPlot::doRenderWindowContent( QPaintDevice* paintDevice )
|
||||
{
|
||||
if ( plotWidget() )
|
||||
{
|
||||
plotWidget()->renderTo( paintDevice, plotWidget()->frameGeometry() );
|
||||
auto rect = plotWidget()->frameGeometry();
|
||||
plotWidget()->renderTo( paintDevice, rect );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user