Adjustments for release

* Show segment plots in Well Log Plot collection
* Improve menu text for operations related to segment plots
* Show reservoir rates for annulus and device
* Make sure curve objects are visible in the Project Tree
* When importing the first summary case, expand case in project tree
* Bump version
This commit is contained in:
Magne Sjaastad
2023-03-13 08:10:33 +01:00
committed by GitHub
parent 087968e7f7
commit 836822c2b9
11 changed files with 67 additions and 58 deletions

View File

@@ -463,6 +463,14 @@ RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPl
summaryMultiPlot->updateAllRequiredEditors();
RiuPlotMainWindowTools::selectAsCurrentItem( plot );
if ( !plot->curveSets().empty() )
{
RiuPlotMainWindowTools::setExpanded( plot->curveSets().front() );
}
else if ( !plot->summaryCurves().empty() )
{
RiuPlotMainWindowTools::setExpanded( plot->summaryCurves().front() );
}
return summaryMultiPlot;
}
@@ -526,7 +534,16 @@ RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( con
if ( !plots.empty() )
{
RiuPlotMainWindowTools::selectAsCurrentItem( plots[0] );
auto* plot = plots.front();
RiuPlotMainWindowTools::selectAsCurrentItem( plot );
if ( !plot->curveSets().empty() )
{
RiuPlotMainWindowTools::setExpanded( plot->curveSets().front() );
}
else if ( !plot->summaryCurves().empty() )
{
RiuPlotMainWindowTools::setExpanded( plot->summaryCurves().front() );
}
}
else
{
@@ -541,25 +558,9 @@ RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( con
//--------------------------------------------------------------------------------------------------
RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( RimSummaryPlot* plot )
{
auto* plotCollection = RimMainPlotCollection::current()->summaryMultiPlotCollection();
std::vector<RimSummaryPlot*> plots{ plot };
auto* summaryMultiPlot = new RimSummaryMultiPlot();
summaryMultiPlot->setColumnCount( RiaDefines::ColumnCount::COLUMNS_1 );
summaryMultiPlot->setRowCount( RiaDefines::RowCount::ROWS_1 );
summaryMultiPlot->setAsPlotMdiWindow();
plotCollection->addSummaryMultiPlot( summaryMultiPlot );
appendPlotsToSummaryMultiPlot( summaryMultiPlot, { plot } );
summaryMultiPlot->setDefaultRangeAggregationSteppingDimension();
plotCollection->updateAllRequiredEditors();
summaryMultiPlot->loadDataAndUpdate();
summaryMultiPlot->updateAllRequiredEditors();
RiuPlotMainWindowTools::selectAsCurrentItem( plot );
return summaryMultiPlot;
return createAndAppendSummaryMultiPlot( plots );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -217,9 +217,17 @@ void RicImportSummaryCasesFeature::addSummaryCases( const std::vector<RimSummary
RiaApplication* app = RiaApplication::instance();
RimProject* proj = app->project();
RimSummaryCaseMainCollection* sumCaseColl = proj->activeOilField() ? proj->activeOilField()->summaryCaseMainCollection() : nullptr;
if ( !sumCaseColl ) return;
bool expandFirstCase = sumCaseColl->allSummaryCases().empty();
sumCaseColl->addCases( cases );
sumCaseColl->updateAllRequiredEditors();
if ( expandFirstCase && !cases.empty() )
{
RiuPlotMainWindowTools::setExpanded( cases.front() );
}
}
//--------------------------------------------------------------------------------------------------

View File

@@ -75,22 +75,20 @@ void RicNewMultiPhaseRftSegmentPlotFeature::onActionTriggered( bool isChecked )
auto wellNames = rftReader->wellNames();
if ( !wellNames.empty() ) wellName = *wellNames.begin();
appendTrackAndCurveForBranchType( plot,
"Reservoir Rates",
{ "CONGRAT", "CONORAT", "CONWRAT" },
wellName,
RiaDefines::RftBranchType::RFT_ANNULUS,
summaryCase );
// Reservoir rates can be available on both annulus and device
for ( auto branchType : { RiaDefines::RftBranchType::RFT_ANNULUS, RiaDefines::RftBranchType::RFT_DEVICE } )
{
for ( auto branchType :
{ RiaDefines::RftBranchType::RFT_ANNULUS, RiaDefines::RftBranchType::RFT_DEVICE, RiaDefines::RftBranchType::RFT_TUBING } )
{
QString trackName = caf::AppEnum<RiaDefines::RftBranchType>::uiText( branchType );
trackName += " Rates";
QString trackName = "Reservoir Rates - " + caf::AppEnum<RiaDefines::RftBranchType>::uiText( branchType );
appendTrackAndCurveForBranchType( plot, trackName, { "CONGRAT", "CONORAT", "CONWRAT" }, wellName, branchType, summaryCase );
}
appendTrackAndCurveForBranchType( plot, trackName, { "SEGGRAT", "SEGORAT", "SEGWRAT" }, wellName, branchType, summaryCase );
}
for ( auto branchType :
{ RiaDefines::RftBranchType::RFT_ANNULUS, RiaDefines::RftBranchType::RFT_DEVICE, RiaDefines::RftBranchType::RFT_TUBING } )
{
QString trackName = caf::AppEnum<RiaDefines::RftBranchType>::uiText( branchType );
trackName += " Rates";
appendTrackAndCurveForBranchType( plot, trackName, { "SEGGRAT", "SEGORAT", "SEGWRAT" }, wellName, branchType, summaryCase );
}
RicNewRftSegmentWellLogPlotFeature::appendPressureTrack( plot, wellName, summaryCase );
@@ -145,6 +143,6 @@ void RicNewMultiPhaseRftSegmentPlotFeature::appendTrackAndCurveForBranchType( Ri
//--------------------------------------------------------------------------------------------------
void RicNewMultiPhaseRftSegmentPlotFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "Create RFT Multi Phase Segment Plot" );
actionToSetup->setText( "Create Multi Phase Segment Plot" );
actionToSetup->setIcon( QIcon( ":/WellLogCurve16x16.png" ) );
}

View File

@@ -75,12 +75,16 @@ void RicNewRftSegmentWellLogPlotFeature::onActionTriggered( bool isChecked )
auto wellNames = rftReader->wellNames();
if ( !wellNames.empty() ) wellName = *wellNames.begin();
// Reservoir rates can be available on both annulus and device
for ( auto branchType : { RiaDefines::RftBranchType::RFT_ANNULUS, RiaDefines::RftBranchType::RFT_DEVICE } )
{
QString trackName = "Reservoir Rates - " + caf::AppEnum<RiaDefines::RftBranchType>::uiText( branchType );
RimWellLogTrack* plotTrack = RicNewWellLogPlotFeatureImpl::createWellLogTrackWithAutoUpdate();
plot->addPlot( plotTrack );
plotTrack->setDescription( "Reservoir Rates" );
plotTrack->setDescription( trackName );
auto curve = createAndAddCurve( plotTrack, "CONGRAT", wellName, RiaDefines::RftBranchType::RFT_ANNULUS, summaryCase );
auto curve = createAndAddCurve( plotTrack, "CONGRAT", wellName, branchType, summaryCase );
curve->setScaleFactor( 1e-3 );
curve->setFillStyle( Qt::SolidPattern );
}
@@ -320,6 +324,6 @@ RimSummaryCase* RicNewRftSegmentWellLogPlotFeature::getSelectedOrFirstRftCase()
//--------------------------------------------------------------------------------------------------
void RicNewRftSegmentWellLogPlotFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "Create RFT Segment Plot" );
actionToSetup->setText( "Create Segment Plot" );
actionToSetup->setIcon( QIcon( ":/WellLogCurve16x16.png" ) );
}

View File

@@ -87,20 +87,7 @@ RimWellBoreStabilityPlot* RicNewWellLogPlotFeatureImpl::createWellBoreStabilityP
//--------------------------------------------------------------------------------------------------
RimWellLogPlot* RicNewWellLogPlotFeatureImpl::createRftSegmentPlot()
{
auto rftPlotCollection = RimMainPlotCollection::current()->rftPlotCollection();
CVF_ASSERT( rftPlotCollection );
// Make sure the summary plot window is created
RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
RimWellLogPlot* plot = new RimWellLogPlot();
plot->setAsPlotMdiWindow();
rftPlotCollection->addPlot( plot );
plot->nameConfig()->setCustomName( QString( "RFT Segment Plot %1" ).arg( rftPlotCollection->plotCount() ) );
rftPlotCollection->updateConnectedEditors();
auto plot = createWellLogPlot();
plot->setDepthOrientation( RiaDefines::Orientation::HORIZONTAL );
plot->setNamingMethod( RiaDefines::ObjectNamingMethod::TEMPLATE );