mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 15:36:09 -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()
|
||||
{
|
||||
RimView* activeView = RiaApplication::instance()->activeReservoirView();
|
||||
if (!activeView) return false;
|
||||
std::vector<RimEclipseWell*> collection;
|
||||
caf::SelectionManager::instance()->objectsByType(&collection);
|
||||
|
||||
RimEclipseResultCase* eclCase = nullptr;
|
||||
activeView->firstAncestorOrThisOfType(eclCase);
|
||||
if (eclCase)
|
||||
if (collection.size() > 0)
|
||||
{
|
||||
RimFlowDiagSolution* defaultFlowDiagSolution = eclCase->defaultFlowDiagSolution();
|
||||
if (defaultFlowDiagSolution)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user