#6007 Minor ui tweaks.

This commit is contained in:
Kristian Bendiksen
2020-06-03 12:08:59 +02:00
committed by Magne Sjaastad
parent c349047a91
commit 38ec6e5069
6 changed files with 41 additions and 15 deletions

View File

@@ -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<RiuQwtPlotCurve::LineStyleEnum> 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<RiuQwtPlotCurve::LineStyleEnum> lineStyles = { RiuQwtPlotCurve::STYLE_SOLID,
RiuQwtPlotCurve::STYLE_DASH,

View File

@@ -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<QString, QString, QString> FaciesKey;
@@ -76,6 +76,8 @@ void RicImportFaciesPropertiesFeature::onActionTriggered( bool isChecked )
std::vector<RifFaciesProperties> 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();
}
//--------------------------------------------------------------------------------------------------