mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 07:16:53 -06:00
#2325 Summary plot: Apply axis settings on preview plot
This commit is contained in:
parent
83ed95a311
commit
0559084d93
@ -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);
|
||||
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -115,6 +115,8 @@ public:
|
||||
void updateCurveNames();
|
||||
QString generatedPlotTitleFromVisibleCurves() const;
|
||||
|
||||
void copyAxisPropertiesFromOther(const RimSummaryPlot& sourceSummaryPlot);
|
||||
|
||||
// RimViewWindow overrides
|
||||
public:
|
||||
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
||||
|
Loading…
Reference in New Issue
Block a user