mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Cross Plot : Improve default curve vector selection
This commit is contained in:
parent
dba6a5820d
commit
20fae240b3
@ -655,7 +655,20 @@ void RimSummaryCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
|||||||
else if (changedField == &m_yPushButtonSelectSummaryAddress)
|
else if (changedField == &m_yPushButtonSelectSummaryAddress)
|
||||||
{
|
{
|
||||||
RiuSummaryCurveDefSelectionDialog dlg(nullptr);
|
RiuSummaryCurveDefSelectionDialog dlg(nullptr);
|
||||||
dlg.setCaseAndAddress(m_yValuesSummaryCase(), m_yValuesCurveVariable->address());
|
RimSummaryCase* candidateCase = m_yValuesSummaryCase();
|
||||||
|
RifEclipseSummaryAddress candicateAddress = m_yValuesCurveVariable->address();
|
||||||
|
|
||||||
|
if (candidateCase == nullptr)
|
||||||
|
{
|
||||||
|
candidateCase = m_xValuesSummaryCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!candicateAddress.isValid())
|
||||||
|
{
|
||||||
|
candicateAddress = m_xValuesCurveVariable->address();
|
||||||
|
}
|
||||||
|
|
||||||
|
dlg.setCaseAndAddress(candidateCase, candicateAddress);
|
||||||
|
|
||||||
if (dlg.exec() == QDialog::Accepted)
|
if (dlg.exec() == QDialog::Accepted)
|
||||||
{
|
{
|
||||||
@ -675,7 +688,20 @@ void RimSummaryCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
|||||||
else if (changedField == &m_xPushButtonSelectSummaryAddress)
|
else if (changedField == &m_xPushButtonSelectSummaryAddress)
|
||||||
{
|
{
|
||||||
RiuSummaryCurveDefSelectionDialog dlg(nullptr);
|
RiuSummaryCurveDefSelectionDialog dlg(nullptr);
|
||||||
dlg.setCaseAndAddress(m_xValuesSummaryCase(), m_xValuesCurveVariable->address());
|
RimSummaryCase* candidateCase = m_xValuesSummaryCase();
|
||||||
|
RifEclipseSummaryAddress candicateAddress = m_xValuesCurveVariable->address();
|
||||||
|
|
||||||
|
if (candidateCase == nullptr)
|
||||||
|
{
|
||||||
|
candidateCase = m_yValuesSummaryCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!candicateAddress.isValid())
|
||||||
|
{
|
||||||
|
candicateAddress = m_yValuesCurveVariable->address();
|
||||||
|
}
|
||||||
|
|
||||||
|
dlg.setCaseAndAddress(candidateCase, candicateAddress);
|
||||||
|
|
||||||
if (dlg.exec() == QDialog::Accepted)
|
if (dlg.exec() == QDialog::Accepted)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user