mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add copyObject to PdmObjectHandle
New syntax to copy an object
auto curveCopy = curve->copyObject<RimSummaryCurve>();
Previous deprecated syntax
RimColorLegend* customLegend = dynamic_cast<RimColorLegend*>(
standardLegend->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
This commit is contained in:
@@ -157,8 +157,7 @@ void RicAdvancedSnapshotExportFeature::exportMultipleSnapshots( const QString& f
|
||||
RimGeoMechView* sourceGeoMechView = dynamic_cast<RimGeoMechView*>( sourceView );
|
||||
if ( geomCase && sourceGeoMechView )
|
||||
{
|
||||
RimGeoMechView* copyOfGeoMechView = dynamic_cast<RimGeoMechView*>(
|
||||
sourceGeoMechView->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
auto copyOfGeoMechView = sourceGeoMechView->copyObject<RimGeoMechView>();
|
||||
CVF_ASSERT( copyOfGeoMechView );
|
||||
|
||||
geomCase->geoMechViews().push_back( copyOfGeoMechView );
|
||||
|
||||
Reference in New Issue
Block a user