mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2088 Curve Calculator : Ask user to calculate curves when expression has changed
This commit is contained in:
@@ -65,6 +65,8 @@ RimSummaryCalculation::RimSummaryCalculation()
|
||||
CAF_PDM_InitFieldNoDefault(&m_timesteps, "TimeSteps", "Time Steps", "", "", "");
|
||||
|
||||
m_exprContextMenuMgr = std::unique_ptr<RiuExpressionContextMenuManager>(new RiuExpressionContextMenuManager());
|
||||
|
||||
m_isDirty = false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -83,6 +85,14 @@ QString RimSummaryCalculation::description() const
|
||||
return m_description;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryCalculation::isDirty() const
|
||||
{
|
||||
return m_isDirty;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -300,6 +310,8 @@ bool RimSummaryCalculation::calculate()
|
||||
{
|
||||
// Copy time vector from source
|
||||
m_timesteps = sourceTimeSteps;
|
||||
|
||||
m_isDirty = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -357,6 +369,16 @@ void RimSummaryCalculation::attachToWidget()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCalculation::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
m_isDirty = true;
|
||||
|
||||
PdmObject::fieldChangedByUi(changedField, oldValue, newValue);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user