#1382 Removed the FlowDiagnostics solutions from the Gui. Always using the one and only default solution

This commit is contained in:
Jacob Støren
2017-04-06 10:59:52 +02:00
parent 970595e0f5
commit 3e37eec71c
4 changed files with 18 additions and 6 deletions

View File

@@ -52,6 +52,8 @@ RimFlowCharacteristicsPlot::RimFlowCharacteristicsPlot()
CAF_PDM_InitFieldNoDefault(&m_case, "FlowCase", "Case", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_flowDiagSolution, "FlowDiagSolution", "Flow Diag Solution", "", "", "");
m_flowDiagSolution.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&m_timeStepSelectionType, "TimeSelectionType", "Time Steps", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_selectedTimeSteps, "SelectedTimeSteps", "", "", "", "");

View File

@@ -82,7 +82,7 @@ RimWellAllocationPlot::RimWellAllocationPlot()
CAF_PDM_InitField(&m_timeStep, "PlotTimeStep", 0, "Time Step", "", "", "");
CAF_PDM_InitField(&m_wellName, "WellName", QString("None"), "Well", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_flowDiagSolution, "FlowDiagSolution", "Flow Diag Solution", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_flowDiagSolution, "FlowDiagSolution", "Plot Type", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_flowType, "FlowType", "Flow Type", "", "", "");
CAF_PDM_InitField(&m_groupSmallContributions, "GroupSmallContributions", true, "Group Small Contributions", "", "", "");
CAF_PDM_InitField(&m_smallContributionsThreshold, "SmallContributionsThreshold", 0.005, "Threshold", "", "", "");
@@ -593,12 +593,18 @@ QList<caf::PdmOptionItemInfo> RimWellAllocationPlot::calculateValueOptions(const
{
if (m_case)
{
std::vector<RimFlowDiagSolution*> flowSols = m_case->flowDiagSolutions();
//std::vector<RimFlowDiagSolution*> flowSols = m_case->flowDiagSolutions();
//for (RimFlowDiagSolution* flowSol : flowSols)
//{
// options.push_back(caf::PdmOptionItemInfo("None", nullptr));
// options.push_back(caf::PdmOptionItemInfo(flowSol->userDescription(), flowSol, false, flowSol->uiIcon()));
//}
for (RimFlowDiagSolution* flowSol : flowSols)
RimFlowDiagSolution* defaultFlowSolution = m_case->defaultFlowDiagSolution();
options.push_back(caf::PdmOptionItemInfo("Well Flow", nullptr));
if (defaultFlowSolution)
{
options.push_back(caf::PdmOptionItemInfo("None", nullptr));
options.push_back(caf::PdmOptionItemInfo(flowSol->userDescription(), flowSol, false, flowSol->uiIcon()));
options.push_back(caf::PdmOptionItemInfo("Allocation", defaultFlowSolution ));
}
}
}