mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#773 Guard against confusing empty case selection
This commit is contained in:
parent
8a8525d3f0
commit
8970c1cb56
@ -250,6 +250,20 @@ void RimSummaryCurveFilter::fieldChangedByUi(const caf::PdmFieldHandle* changedF
|
||||
{
|
||||
updatePlotAxisForCurves();
|
||||
}
|
||||
else if (changedField == &m_selectedSummaryCases)
|
||||
{
|
||||
if (newValue.toList().size() < 1)
|
||||
{
|
||||
if (m_selectionCache.size() > 0)
|
||||
{
|
||||
m_selectedSummaryCases.setValue(m_selectionCache);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_selectionCache = m_selectedSummaryCases.value();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -123,5 +123,7 @@ private:
|
||||
caf::PdmField< AppearanceTypeAppEnum > m_wellAppearanceType;
|
||||
caf::PdmField< AppearanceTypeAppEnum > m_groupAppearanceType;
|
||||
caf::PdmField< AppearanceTypeAppEnum > m_regionAppearanceType;
|
||||
|
||||
std::vector< caf::PdmPointer<RimSummaryCase> > m_selectionCache;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user