mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2138 PLT Plot. Add context command to tree view and 3D objects
This commit is contained in:
parent
dc11cbd4c5
commit
440b10e381
@ -58,20 +58,15 @@ bool RicNewPltPlotFeature::isCommandEnabled()
|
||||
if (RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot()) return false;
|
||||
|
||||
RimSimWellInView* simWell = caf::firstAncestorOfTypeFromSelectedObject<RimSimWellInView*>();
|
||||
RimWellPath* rimWellPath = simWell == nullptr ? caf::firstAncestorOfTypeFromSelectedObject<RimWellPath*>() : nullptr;
|
||||
|
||||
bool enable = true;
|
||||
if (simWell != nullptr)
|
||||
{
|
||||
RimEclipseResultCase* eclCase = caf::firstAncestorOfTypeFromSelectedObject<RimEclipseResultCase*>();
|
||||
if (simWell != nullptr)
|
||||
{
|
||||
enable &= RimWellPlotTools::hasFlowData(eclCase);
|
||||
}
|
||||
}
|
||||
else if (rimWellPath)
|
||||
{
|
||||
enable &= RimWellPlotTools::hasFlowData(rimWellPath);
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
QString simWellName = simWell->name();
|
||||
|
||||
RimWellPath* wellPath = proj->wellPathFromSimulationWell(simWellName);
|
||||
enable = wellPath != nullptr;
|
||||
}
|
||||
return enable;
|
||||
}
|
||||
|
@ -235,7 +235,6 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
|
||||
commandIds << "RicNewWellLogFileCurveFeature";
|
||||
commandIds << "RicNewWellLogCurveExtractionFeature";
|
||||
commandIds << "RicNewWellPathIntersectionFeature";
|
||||
commandIds << "RicNewRftPlotFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimWellLogFile*>(uiItem))
|
||||
{
|
||||
|
@ -307,6 +307,7 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
|
||||
commandIds << "RicNewWellLogCurveExtractionFeature";
|
||||
commandIds << "RicNewWellLogFileCurveFeature";
|
||||
commandIds << "RicNewRftPlotFeature";
|
||||
commandIds << "RicNewPltPlotFeature";
|
||||
commandIds << "Separator";
|
||||
commandIds << "RicNewWellPathIntersectionFeature";
|
||||
commandIds << "RicNewFishbonesSubsAtMeasuredDepthFeature";
|
||||
|
Loading…
Reference in New Issue
Block a user