Example #1
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RimWellLogExtractionCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
    RimWellLogCurve::fieldChangedByUi(changedField, oldValue, newValue);

    if (changedField == &m_case)
    {
        clampTimestep();
        
        auto wellNameSet = findSortedWellNames();
        if (!wellNameSet.count(m_simWellName())) m_simWellName = "None";

        clearGeneratedSimWellPaths();

        this->loadDataAndUpdate(true);
    }    
    else if (changedField == &m_wellPath)
    {
        this->loadDataAndUpdate(true);
    }
    else if (changedField == &m_simWellName)
    {
        clearGeneratedSimWellPaths();

        this->loadDataAndUpdate(true);
    }
    else if (changedField == &m_trajectoryType)
    {
        this->loadDataAndUpdate(true);
    }
    else if (changedField == &m_branchDetection ||
             changedField == &m_branchIndex ||
             changedField == &m_branchIndex)
    {
        clearGeneratedSimWellPaths();

        this->loadDataAndUpdate(true);
    }
    else if (changedField == &m_timeStep)
    {
        this->loadDataAndUpdate(true);
    }

    if (changedField == &m_addCaseNameToCurveName ||
        changedField == &m_addPropertyToCurveName ||
        changedField == &m_addWellNameToCurveName ||
        changedField == &m_addTimestepToCurveName ||
        changedField == &m_addDateToCurveName)
    {
        this->uiCapability()->updateConnectedEditors();
        updateCurveNameAndUpdatePlotLegend();
    }
}
Example #2
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RimPlotCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
    if (changedField == &m_showCurve)
    {
        this->updateCurveVisibility(true);
        if (m_showCurve()) loadDataAndUpdate(true);
    }
    else if (changedField == &m_curveName)
    {
        m_customCurveName = m_curveName;
        updateCurveNameAndUpdatePlotLegend();
    }
    else if (&m_curveColor == changedField
             || &m_curveThickness == changedField
             || &m_pointSymbol == changedField
             || &m_lineStyle == changedField
             || &m_symbolSkipPixelDistance == changedField
             || &m_curveInterpolation == changedField)
    {
        updateCurveAppearance();
    }
    else if (changedField == &m_isUsingAutoName)
    {
        if (!m_isUsingAutoName)
        {
            m_customCurveName = createCurveAutoName();
        }

        updateCurveNameAndUpdatePlotLegend();
    }
    else if (changedField == &m_showLegend)
    {
        updateLegendEntryVisibilityAndPlotLegend();
    }

    if (m_parentQwtPlot) m_parentQwtPlot->replot();
}