mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
* Move case loading commands from Commands to project and case * Major refactor * Fix problems with Python examples * Add ability to export snapshot from just one view + fixup * Case comments and black * Make all modules pass pylint test
This commit is contained in:
@@ -35,6 +35,7 @@ CAF_PDM_SOURCE_INIT( RicfSetTimeStep, "setTimeStep" );
|
||||
RicfSetTimeStep::RicfSetTimeStep()
|
||||
{
|
||||
RICF_InitField( &m_caseId, "caseId", -1, "Case ID", "", "", "" );
|
||||
RICF_InitField( &m_viewId, "viewId", -1, "View ID", "", "", "" );
|
||||
RICF_InitField( &m_timeStepIndex, "timeStep", -1, "Time Step Index", "", "", "" );
|
||||
}
|
||||
|
||||
@@ -46,6 +47,14 @@ void RicfSetTimeStep::setCaseId( int caseId )
|
||||
m_caseId = caseId;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicfSetTimeStep::setViewId( int viewId )
|
||||
{
|
||||
m_viewId = viewId;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -93,8 +102,11 @@ RicfCommandResponse RicfSetTimeStep::execute()
|
||||
|
||||
for ( Rim3dView* view : eclipseCase->views() )
|
||||
{
|
||||
view->setCurrentTimeStepAndUpdate( m_timeStepIndex );
|
||||
view->createDisplayModelAndRedraw();
|
||||
if ( m_viewId() == -1 || view->id() == m_viewId() )
|
||||
{
|
||||
view->setCurrentTimeStepAndUpdate( m_timeStepIndex );
|
||||
view->createDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
return RicfCommandResponse();
|
||||
|
||||
Reference in New Issue
Block a user