diff --git a/ApplicationCode/Commands/CompletionCommands/RicNewFractureModelPlotFeature.cpp b/ApplicationCode/Commands/CompletionCommands/RicNewFractureModelPlotFeature.cpp index d0110e91f9..e4edababde 100644 --- a/ApplicationCode/Commands/CompletionCommands/RicNewFractureModelPlotFeature.cpp +++ b/ApplicationCode/Commands/CompletionCommands/RicNewFractureModelPlotFeature.cpp @@ -27,6 +27,8 @@ #include "RigWellPath.h" +#include "RimColorLegend.h" +#include "RimColorLegendCollection.h" #include "RimEclipseCase.h" #include "RimEclipseView.h" #include "RimFaciesPropertiesCurve.h" @@ -115,8 +117,6 @@ RimFractureModelPlot* plot->setLegendsHorizontal( true ); plot->setDepthType( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ); plot->setAutoScaleDepthEnabled( true ); - - // RicNewWellLogPlotFeatureImpl::updateAfterCreation( plot ); plot->loadDataAndUpdate(); } @@ -197,6 +197,13 @@ void RicNewFractureModelPlotFeature::createFaciesTrack( RimFractureModelPlot* pl faciesTrack->setFormationCase( eclipseCase ); faciesTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::RESULT_PROPERTY_ANNOTATIONS ); faciesTrack->setRegionPropertyResultType( RiaDefines::ResultCatType::INPUT_PROPERTY, defaultProperty ); + + RimColorLegend* faciesColors = RimProject::current()->colorLegendCollection()->findByName( "Facies colors" ); + if ( faciesColors ) + { + faciesTrack->setColorShadingLegend( faciesColors ); + } + faciesTrack->setVisibleXRange( 0.0, 0.0 ); faciesTrack->setColSpan( RimPlot::ONE ); @@ -246,9 +253,10 @@ void RicNewFractureModelPlotFeature::createParametersTrack( RimFractureModelPlot plotTrack->setVisibleXRange( 0.0, 2.0 ); plotTrack->setAutoScaleXEnabled( true ); plotTrack->setTickIntervals( 1.0, 0.2 ); - plotTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR ); + plotTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR ); plotTrack->setShowRegionLabels( true ); plotTrack->setShowWindow( true ); + plotTrack->setLogarithmicScale( false ); caf::ColorTable colors = RiaColorTables::contrastCategoryPaletteColors(); std::vector lineStyles = {RiuQwtPlotCurve::STYLE_SOLID, @@ -296,10 +304,10 @@ void RicNewFractureModelPlotFeature::createFaciesPropertiesTrack( RimFractureMod plotTrack->setVisibleXRange( 0.0, 2.0 ); plotTrack->setAutoScaleXEnabled( true ); plotTrack->setTickIntervals( 1.0, 0.2 ); - plotTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR_AND_MINOR ); + plotTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR ); + plotTrack->setLogarithmicScale( false ); plotTrack->setShowRegionLabels( true ); plotTrack->setShowWindow( true ); - caf::ColorTable colors = RiaColorTables::contrastCategoryPaletteColors(); std::vector lineStyles = { RiuQwtPlotCurve::STYLE_SOLID, RiuQwtPlotCurve::STYLE_DASH, diff --git a/ApplicationCode/Commands/RicImportFaciesPropertiesFeature.cpp b/ApplicationCode/Commands/RicImportFaciesPropertiesFeature.cpp index ec22ceae6d..a5b884f88a 100644 --- a/ApplicationCode/Commands/RicImportFaciesPropertiesFeature.cpp +++ b/ApplicationCode/Commands/RicImportFaciesPropertiesFeature.cpp @@ -59,16 +59,16 @@ void RicImportFaciesPropertiesFeature::onActionTriggered( bool isChecked ) // Open dialog box to select files RiaApplication* app = RiaApplication::instance(); - QString defaultDir = app->lastUsedDialogDirectory( "WELLPATH_DIR" ); - QStringList filePaths = QFileDialog::getOpenFileNames( Riu3DMainWindowTools::mainWindowWidget(), - "Import Facies Properties", - defaultDir, - "Facies Properties (*.csv);;All Files (*.*)" ); + QString defaultDir = app->lastUsedDialogDirectory( "FACIES_DIR" ); + QString filePath = QFileDialog::getOpenFileName( Riu3DMainWindowTools::mainWindowWidget(), + "Import Facies Properties", + defaultDir, + "Facies Properties (*.csv);;All Files (*.*)" ); - if ( filePaths.size() < 1 ) return; + if ( filePath.isNull() ) return; // Remember the path to next time - app->setLastUsedDialogDirectory( "WELLPATH_DIR", QFileInfo( filePaths.last() ).absolutePath() ); + app->setLastUsedDialogDirectory( "FACIES_DIR", QFileInfo( filePath ).absolutePath() ); typedef std::tuple FaciesKey; @@ -76,6 +76,8 @@ void RicImportFaciesPropertiesFeature::onActionTriggered( bool isChecked ) std::vector rifFaciesProperties; try { + QStringList filePaths; + filePaths << filePath; RifFaciesPropertiesReader::readFaciesProperties( rifFaciesProperties, filePaths ); } catch ( FileParseException& exception ) @@ -130,7 +132,9 @@ void RicImportFaciesPropertiesFeature::onActionTriggered( bool isChecked ) rimFaciesProperties->setPropertiesForFacies( key, rigFaciesProperties ); } + rimFaciesProperties->setFilePath( filePath ); fractureModel->setFaciesProperties( rimFaciesProperties ); + fractureModel->updateConnectedEditors(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFractureModel.cpp b/ApplicationCode/ProjectDataModel/Completions/RimFractureModel.cpp index 22cc9b1f68..ad60627c05 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFractureModel.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimFractureModel.cpp @@ -106,6 +106,8 @@ RimFractureModel::RimFractureModel() CAF_PDM_InitField( &m_boundingBoxVertical, "BoundingBoxVertical", 100.0, "Bounding Box Vertical", "", "", "" ); CAF_PDM_InitFieldNoDefault( &m_faciesProperties, "FaciesProperties", "Facies Properties", "", "", "" ); + m_faciesProperties.uiCapability()->setUiHidden( true ); + m_faciesProperties.uiCapability()->setUiTreeHidden( true ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimFaciesProperties.cpp b/ApplicationCode/ProjectDataModel/RimFaciesProperties.cpp index a5b031d3cf..f5e1d7f2d6 100644 --- a/ApplicationCode/ProjectDataModel/RimFaciesProperties.cpp +++ b/ApplicationCode/ProjectDataModel/RimFaciesProperties.cpp @@ -38,6 +38,9 @@ RimFaciesProperties::RimFaciesProperties() m_propertiesTable.uiCapability()->setUiEditorTypeName( caf::PdmUiTextEditor::uiEditorTypeName() ); m_propertiesTable.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN ); m_propertiesTable.uiCapability()->setUiReadOnly( true ); + m_propertiesTable.xmlCapability()->disableIO(); + + setUiName( "Facies Properties" ); } //-------------------------------------------------------------------------------------------------- @@ -119,10 +122,10 @@ QString RimFaciesProperties::generatePropertiesTable() " Formation" " Facies" " Porosity" - " Young's Modulus" - " Poisson's Ratio" + " Young's
Modulus" + " Poisson's
Ratio" " K-Ic" - " Proppant Embedment" + " Proppant
Embedment" " " " " " " ); diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp index dd89f0378d..6b56bdda8f 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp @@ -1496,6 +1496,14 @@ void RimWellLogTrack::setXAxisGridVisibility( RimWellLogPlot::AxisGridVisibility m_xAxisGridVisibility = gridLines; } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogTrack::setColorShadingLegend( RimColorLegend* colorLegend ) +{ + m_colorShadingLegend = colorLegend; +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.h b/ApplicationCode/ProjectDataModel/RimWellLogTrack.h index b0bf38720f..48583bd3a9 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.h @@ -166,6 +166,7 @@ public: void setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType annotationType ); void setAnnotationDisplay( RiuPlotAnnotationTool::RegionDisplay annotationDisplay ); void setAnnotationTransparency( int percent ); + void setColorShadingLegend( RimColorLegend* colorLegend ); RiuPlotAnnotationTool::RegionAnnotationType annotationType() const; RiuPlotAnnotationTool::RegionDisplay annotationDisplay() const;