mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-27 15:41:00 -05:00
ResInsight: Migrate project data model to attribute map
This commit is contained in:
1 parent
c57200331e
commit
064ac45da0
234 files changed
+1232
-3168
No files matched your search
@@ -589,6 +589,18 @@ void RimIntersectionCollection::defineUiOrdering( QString uiConfigName, caf::Pdm
|
||||
m_depthUpperThreshold.uiCapability()->setUiReadOnly( !m_depthThresholdOverridden() );
|
||||
m_depthLowerThreshold.uiCapability()->setUiReadOnly( !m_depthThresholdOverridden() );
|
||||
|
||||
RimEclipseView* eclView = eclipseView();
|
||||
if ( eclView && eclView->mainGrid() )
|
||||
{
|
||||
const cvf::BoundingBox bb = eclView->mainGrid()->boundingBox();
|
||||
|
||||
for ( auto* field : { &m_depthUpperThreshold, &m_depthLowerThreshold } )
|
||||
{
|
||||
field->uiCapability()->setAttribute( caf::PdmUiDoubleSliderEditor::Keys::MINIMUM, -1.0 * bb.max().z() );
|
||||
field->uiCapability()->setAttribute( caf::PdmUiDoubleSliderEditor::Keys::MAXIMUM, -1.0 * bb.min().z() );
|
||||
}
|
||||
}
|
||||
|
||||
filterGroup->add( &m_depthThresholdOverridden );
|
||||
filterGroup->add( &m_depthFilterType );
|
||||
|
||||
@@ -629,29 +641,6 @@ void RimIntersectionCollection::defineUiOrdering( QString uiConfigName, caf::Pdm
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionCollection::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
auto* doubleSliderAttrib = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>( attribute );
|
||||
if ( doubleSliderAttrib )
|
||||
{
|
||||
if ( ( field == &m_depthUpperThreshold ) || ( field == &m_depthLowerThreshold ) )
|
||||
{
|
||||
RimEclipseView* eclView = eclipseView();
|
||||
|
||||
if ( eclView && eclView->mainGrid() )
|
||||
{
|
||||
const cvf::BoundingBox bb = eclView->mainGrid()->boundingBox();
|
||||
|
||||
doubleSliderAttrib->m_minimum = -1.0 * bb.max().z();
|
||||
doubleSliderAttrib->m_maximum = -1.0 * bb.min().z();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user