Fix assert in Show Contibuting Wells due to wrongful use of firstAnchestorOf

This commit is contained in:
Jacob Støren 2017-04-27 09:51:31 +02:00
parent 7ff27a1938
commit ff1b8c6db8
3 changed files with 4 additions and 5 deletions

View File

@ -54,8 +54,7 @@ void RicShowContributingWellsFromPlotFeature::onActionTriggered(bool isChecked)
int timeStep = wellAllocationPlot->timeStep();
QString wellName = wellAllocationPlot->wellName();
RimEclipseResultCase* wellAllocationResultCase = nullptr;
wellAllocationPlot->flowDiagSolution()->firstAncestorOrThisOfTypeAsserted(wellAllocationResultCase);
RimEclipseResultCase* wellAllocationResultCase = wellAllocationPlot->rimCase();
RicShowContributingWellsFeatureImpl::maniuplateSelectedView(wellAllocationResultCase, wellName, timeStep);
}

View File

@ -516,9 +516,9 @@ caf::PdmObject* RimWellAllocationPlot::plotLegend()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimFlowDiagSolution* RimWellAllocationPlot::flowDiagSolution()
RimEclipseResultCase* RimWellAllocationPlot::rimCase()
{
return m_flowDiagSolution();
return m_case();
}
//--------------------------------------------------------------------------------------------------

View File

@ -69,7 +69,7 @@ public:
RimWellLogPlot* accumulatedWellFlowPlot();
RimTotalWellAllocationPlot* totalWellFlowPlot();
caf::PdmObject* plotLegend();
RimFlowDiagSolution* flowDiagSolution();
RimEclipseResultCase* rimCase();
int timeStep();
QString wellName() const;