This commit is contained in:
Magne Sjaastad
2017-03-16 08:22:09 +01:00
parent 10edf44ee3
commit 19e988925a
4 changed files with 8 additions and 5 deletions

View File

@@ -89,7 +89,7 @@ void RicShowContributingWellsFeature::onActionTriggered(bool isChecked)
RimEclipseResultCase* eclipseResultCase = nullptr;
well->firstAncestorOrThisOfTypeAsserted(eclipseResultCase);
RimEclipseView* modifiedView = RicShowContributingWellsFeatureImpl::showViewSelection(eclipseResultCase, well->name(), eclipseView->currentTimeStep());
RimEclipseView* modifiedView = RicShowContributingWellsFeatureImpl::maniuplateSelectedView(eclipseResultCase, well->name(), eclipseView->currentTimeStep());
if (modifiedView)
{
modifiedView->createDisplayModelAndRedraw();

View File

@@ -46,7 +46,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimEclipseView* RicShowContributingWellsFeatureImpl::showViewSelection(RimEclipseResultCase* eclipseResultCase, QString wellName, int timeStep)
RimEclipseView* RicShowContributingWellsFeatureImpl::maniuplateSelectedView(RimEclipseResultCase* eclipseResultCase, QString wellName, int timeStep)
{
const QString lastUsedViewKey("lastUsedViewKey");

View File

@@ -34,7 +34,7 @@ class RimFlowDiagSolution;
class RicShowContributingWellsFeatureImpl
{
public:
static RimEclipseView* showViewSelection(RimEclipseResultCase* wellAllocationResultCase, QString wellName, int timeStep);
static RimEclipseView* maniuplateSelectedView(RimEclipseResultCase* wellAllocationResultCase, QString wellName, int timeStep);
private:
static void modifyViewToShowContributingWells(RimEclipseView* viewToModify, const QString& wellName, int timeStep);

View File

@@ -35,7 +35,10 @@ CAF_CMD_SOURCE_INIT(RicShowContributingWellsFromPlotFeature, "RicShowContributin
//--------------------------------------------------------------------------------------------------
bool RicShowContributingWellsFromPlotFeature::isCommandEnabled()
{
return true;
RimWellAllocationPlot* wellAllocationPlot = RiaApplication::instance()->activeWellAllocationPlot();
if (wellAllocationPlot) return true;
return false;
}
//--------------------------------------------------------------------------------------------------
@@ -52,7 +55,7 @@ void RicShowContributingWellsFromPlotFeature::onActionTriggered(bool isChecked)
RimEclipseResultCase* wellAllocationResultCase = nullptr;
wellAllocationPlot->flowDiagSolution()->firstAncestorOrThisOfTypeAsserted(wellAllocationResultCase);
RicShowContributingWellsFeatureImpl::showViewSelection(wellAllocationResultCase, wellName, timeStep);
RicShowContributingWellsFeatureImpl::maniuplateSelectedView(wellAllocationResultCase, wellName, timeStep);
}
//--------------------------------------------------------------------------------------------------