#5837 Well Measurements : Allow paste of curves

This commit is contained in:
Magne Sjaastad 2020-04-28 06:36:17 +02:00
parent eb46552e60
commit 8c64dbeae9
2 changed files with 5 additions and 3 deletions

View File

@ -79,6 +79,6 @@ void RicNewWellMeasurementCurveFeature::onActionTriggered( bool isChecked )
//--------------------------------------------------------------------------------------------------
void RicNewWellMeasurementCurveFeature::setupActionLook( QAction* actionToSetup )
{
// actionToSetup->setIcon( QIcon( ":/WellLogCurve16x16.png" ) );
actionToSetup->setIcon( QIcon( ":/WellLogCurve16x16.png" ) );
actionToSetup->setText( "New Well Measurement Curve" );
}

View File

@ -26,6 +26,7 @@
#include "RimWellLogExtractionCurve.h"
#include "RimWellLogFileCurve.h"
#include "RimWellLogTrack.h"
#include "RimWellMeasurementCurve.h"
#include "cafPdmObjectGroup.h"
#include "cafPdmObjectHandle.h"
@ -105,8 +106,9 @@ void RicPasteWellLogCurveFeature::onActionTriggered( bool isChecked )
continue;
}
RimWellLogFileCurve* fileCurve = dynamic_cast<RimWellLogFileCurve*>( sourceObjects[i].p() );
if ( fileCurve )
RimWellLogFileCurve* fileCurve = dynamic_cast<RimWellLogFileCurve*>( sourceObjects[i].p() );
RimWellMeasurementCurve* measurementCurve = dynamic_cast<RimWellMeasurementCurve*>( sourceObjects[i].p() );
if ( fileCurve || measurementCurve )
{
RimWellLogFileCurve* newObject = dynamic_cast<RimWellLogFileCurve*>(
sourceObjects[i]->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );