#5527 Multiplot : Copy plots when creating a multi plot

This commit is contained in:
Magne Sjaastad
2020-02-14 15:39:45 +01:00
parent 2b45a9af7f
commit 12a0a8c358

View File

@@ -65,7 +65,18 @@ RicfCommandResponse RicNewMultiPlotFeature::execute()
{
plots.push_back( reinterpret_cast<RimPlot*>( ptr ) );
}
plotWindow->movePlotsToThis( plots, nullptr );
for ( auto plot : plots )
{
auto copy = dynamic_cast<RimPlot*>( plot->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
plotWindow->addPlot( copy );
copy->resolveReferencesRecursively();
copy->revokeMdiWindowStatus();
copy->setShowWindow( true );
copy->loadDataAndUpdate();
}
}
project->updateAllRequiredEditors();