mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8575 Summary Plot: Restore zoom of time axis on project load.
This commit is contained in:
parent
10cb2d7d0b
commit
f955d9e645
@ -2057,7 +2057,7 @@ void RimSummaryPlot::initAfterRead()
|
|||||||
if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2021.10.2" ) )
|
if ( RimProject::current()->isProjectFileVersionEqualOrOlderThan( "2021.10.2" ) )
|
||||||
{
|
{
|
||||||
auto copyAxis = [this]( RiuPlotAxis axis, auto sourceObject ) {
|
auto copyAxis = [this]( RiuPlotAxis axis, auto sourceObject ) {
|
||||||
auto axisProperties = dynamic_cast<RimPlotAxisProperties*>( axisPropertiesForPlotAxis( axis ) );
|
auto axisProperties = axisPropertiesForPlotAxis( axis );
|
||||||
if ( axisProperties )
|
if ( axisProperties )
|
||||||
{
|
{
|
||||||
QString data = sourceObject->writeObjectToXmlString();
|
QString data = sourceObject->writeObjectToXmlString();
|
||||||
@ -2065,8 +2065,12 @@ void RimSummaryPlot::initAfterRead()
|
|||||||
// This operation will overwrite the plot axis side, default is left
|
// This operation will overwrite the plot axis side, default is left
|
||||||
axisProperties->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() );
|
axisProperties->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() );
|
||||||
|
|
||||||
// Reset the plot axis for the axis property
|
auto plotAxisProperties = dynamic_cast<RimPlotAxisProperties*>( axisProperties );
|
||||||
axisProperties->setNameAndAxis( axisProperties->name(), axis.axis(), 0 );
|
if ( plotAxisProperties )
|
||||||
|
{
|
||||||
|
// Reset the plot axis for the axis property
|
||||||
|
plotAxisProperties->setNameAndAxis( axisProperties->name(), axis.axis(), 0 );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user