mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 23:46:00 -06:00
#1263 ShowWellAllocationPlot must be available when well is selected
This commit is contained in:
parent
2b7927e5a6
commit
4498e353df
@ -41,18 +41,12 @@ CAF_CMD_SOURCE_INIT(RicShowWellAllocationPlotFeature, "RicShowWellAllocationPlot
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RicShowWellAllocationPlotFeature::isCommandEnabled()
|
bool RicShowWellAllocationPlotFeature::isCommandEnabled()
|
||||||
{
|
{
|
||||||
RimView* activeView = RiaApplication::instance()->activeReservoirView();
|
std::vector<RimEclipseWell*> collection;
|
||||||
if (!activeView) return false;
|
caf::SelectionManager::instance()->objectsByType(&collection);
|
||||||
|
|
||||||
RimEclipseResultCase* eclCase = nullptr;
|
if (collection.size() > 0)
|
||||||
activeView->firstAncestorOrThisOfType(eclCase);
|
|
||||||
if (eclCase)
|
|
||||||
{
|
{
|
||||||
RimFlowDiagSolution* defaultFlowDiagSolution = eclCase->defaultFlowDiagSolution();
|
return true;
|
||||||
if (defaultFlowDiagSolution)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user