mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 17:10:19 -05: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:
1 parent
7efefbb93a
commit
a0ebb6e496
46 files changed
+126
-131
No files matched your search
@@ -159,8 +159,7 @@ void RimSummaryMultiPlotCollection::duplicatePlot( RimSummaryMultiPlot* plotToDu
|
||||
{
|
||||
if ( !plotToDuplicate ) return;
|
||||
|
||||
auto plotCopy = dynamic_cast<RimSummaryMultiPlot*>( plotToDuplicate->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
||||
auto plotCopy = plotToDuplicate->copyObject<RimSummaryMultiPlot>();
|
||||
addSummaryMultiPlot( plotCopy );
|
||||
|
||||
plotCopy->resolveReferencesRecursively();
|
||||
|
||||
Reference in new issue
Block a user