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:
@@ -329,8 +329,7 @@ RimEclipseView* RimEclipseCase::createCopyAndAddView( const RimEclipseView* sour
|
||||
{
|
||||
CVF_ASSERT( sourceView );
|
||||
|
||||
RimEclipseView* rimEclipseView =
|
||||
dynamic_cast<RimEclipseView*>( sourceView->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
auto rimEclipseView = sourceView->copyObject<RimEclipseView>();
|
||||
CVF_ASSERT( rimEclipseView );
|
||||
rimEclipseView->setEclipseCase( this );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user