mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05:00
Propagate variable changed signal to RicUserDefinedCalculatorUi
- ensure that the UI is updated - if the grid size is different, set destination case equal to the input variable case
This commit is contained in:
1 parent
917fd9b3b5
commit
fb890300c5
5 files changed
+50
-14
No files matched your search
@@ -295,16 +295,20 @@ void RimGridCalculation::initAfterRead()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGridCalculation::onVariableUpdated( const SignalEmitter* emitter )
|
||||
{
|
||||
if ( m_destinationCase == nullptr )
|
||||
if ( auto variable = dynamic_cast<const RimGridCalculationVariable*>( emitter ) )
|
||||
{
|
||||
auto variable = dynamic_cast<const RimGridCalculationVariable*>( emitter );
|
||||
if ( variable && variable->eclipseCase() )
|
||||
if ( auto variableCase = variable->eclipseCase() )
|
||||
{
|
||||
m_destinationCase = variable->eclipseCase();
|
||||
|
||||
updateConnectedEditors();
|
||||
if ( !m_destinationCase || !m_destinationCase->isGridSizeEqualTo( variableCase ) )
|
||||
{
|
||||
m_destinationCase = variableCase;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
updateConnectedEditors();
|
||||
|
||||
variableUpdated.send();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user