#2325 Summary plot: Apply axis settings on preview plot

This commit is contained in:
Magne Sjaastad 2018-01-25 21:16:24 +01:00
parent 83ed95a311
commit 0559084d93
3 changed files with 22 additions and 0 deletions

View File

@ -510,8 +510,10 @@ void RicSummaryCurveCreator::populateCurveCreator(const RimSummaryPlot& sourceSu
curve->setCurveVisiblity(false);
}
m_previewPlot->copyAxisPropertiesFromOther(sourceSummaryPlot);
m_previewPlot->enableAutoPlotTitle(sourceSummaryPlot.autoPlotTitle());
m_previewPlot->updatePlotTitle();
m_previewPlot->updateAxes();
m_summaryCurveSelectionEditor->summaryAddressSelection()->setSelectedCurveDefinitions(curveDefs);

View File

@ -528,6 +528,24 @@ QString RimSummaryPlot::generatedPlotTitleFromVisibleCurves() const
return generatePlotTitle(&nameHelper);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryPlot::copyAxisPropertiesFromOther(const RimSummaryPlot& sourceSummaryPlot)
{
{
QString data = sourceSummaryPlot.yAxisPropertiesLeftOrRight(RiaDefines::PLOT_AXIS_LEFT)->writeObjectToXmlString();
yAxisPropertiesLeftOrRight(RiaDefines::PLOT_AXIS_LEFT)
->readObjectFromXmlString(data, caf::PdmDefaultObjectFactory::instance());
}
{
QString data = sourceSummaryPlot.yAxisPropertiesLeftOrRight(RiaDefines::PLOT_AXIS_RIGHT)->writeObjectToXmlString();
yAxisPropertiesLeftOrRight(RiaDefines::PLOT_AXIS_RIGHT)
->readObjectFromXmlString(data, caf::PdmDefaultObjectFactory::instance());
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -115,6 +115,8 @@ public:
void updateCurveNames();
QString generatedPlotTitleFromVisibleCurves() const;
void copyAxisPropertiesFromOther(const RimSummaryPlot& sourceSummaryPlot);
// RimViewWindow overrides
public:
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;