#12927 Add optional time threshold before creating ESMRY

When checking timestamp for ESMRY vs SMSPEC, allow ESMRY to be written before SMSPEC within a given limit in time difference.
This commit is contained in:
Magne Sjaastad committed 2025-10-07 12:18:03 +02:00
1 parent b321109904
commit e98bc867e4
6 files changed
+47 -10

No files matched your search

@@ -26,6 +26,7 @@
#include "PlotTemplates/RimPlotTemplateFileItem.h"
#include "cafPdmUiCheckBoxAndTextEditor.h"
#include "cafPdmUiCheckBoxEditor.h"
#include "cafPdmUiComboBoxEditor.h"
#include "cafPdmUiListEditor.h"
@@ -146,6 +147,15 @@ RiaPreferencesSummary::RiaPreferencesSummary()
"" );
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_useEnhancedSummaryDataFile );
CAF_PDM_InitField( &m_esmryTimeThreshold,
"esmryTimeThreshold",
std::make_pair( false, 30 ),
"ESMRY Time Difference Threshold [s]",
"",
" Create ESMRY file if time difference between SMSPEC and ESMRY is larger than the threshold.",
"" );
m_esmryTimeThreshold.uiCapability()->setUiEditorTypeName( caf::PdmUiCheckBoxAndTextEditor::uiEditorTypeName() );
CAF_PDM_InitField( &m_createH5SummaryDataFile,
"createH5SummaryDataFile_v01",
false,
@@ -348,6 +358,19 @@ bool RiaPreferencesSummary::useImprovedSummaryImport() const
return m_useImprovedSummaryImport;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RiaPreferencesSummary::esmryTimeThreshold() const
{
if ( m_esmryTimeThreshold().first )
{
return m_esmryTimeThreshold().second;
}
return 0;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -430,6 +453,10 @@ void RiaPreferencesSummary::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
uiOrdering.add( &m_useEnhancedSummaryDataFile );
}
uiOrdering.add( &m_createEnhancedSummaryDataFile );
if ( m_createEnhancedSummaryDataFile() )
{
uiOrdering.add( &m_esmryTimeThreshold );
}
}
else if ( m_summaryReader == SummaryReaderMode::HDF5_OPM_COMMON )
{