mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#11482 Show mesh lines by default for faults in contour maps
Add settings used to control the visibility of fault mesh
This commit is contained in:
@@ -156,6 +156,7 @@ void RicNewContourMapViewFeature::onActionTriggered( bool isChecked )
|
||||
oilField->eclipseContourMapCollection()->updateConnectedEditors();
|
||||
|
||||
Riu3DMainWindowTools::setExpanded( eclipseContourMap );
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( eclipseContourMap );
|
||||
}
|
||||
else if ( geoMechContourMap )
|
||||
{
|
||||
@@ -171,6 +172,7 @@ void RicNewContourMapViewFeature::onActionTriggered( bool isChecked )
|
||||
geoMechContourMap->createDisplayModelAndRedraw();
|
||||
geoMechContourMap->zoomAll();
|
||||
Riu3DMainWindowTools::setExpanded( geoMechContourMap );
|
||||
Riu3DMainWindowTools::selectAsCurrentItem( geoMechContourMap );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,12 @@ RimEclipseContourMapView::RimEclipseContourMapView()
|
||||
CAF_PDM_InitField( &m_showAxisLines, "ShowAxisLines", true, "Show Axis Lines" );
|
||||
CAF_PDM_InitField( &m_showScaleLegend, "ShowScaleLegend", true, "Show Scale Legend" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_showFaultLines, "ShowFaultLines", "Show Fault Lines" );
|
||||
m_showFaultLines.registerGetMethod( this, &RimEclipseContourMapView::isFaultLinesVisible );
|
||||
m_showFaultLines.registerSetMethod( this, &RimEclipseContourMapView::setFaultLinesVisible );
|
||||
|
||||
meshMode = RiaDefines::MeshModeType::FAULTS_MESH;
|
||||
|
||||
setFaultVisParameters();
|
||||
|
||||
setDefaultCustomName();
|
||||
@@ -169,7 +175,6 @@ void RimEclipseContourMapView::initAfterRead()
|
||||
|
||||
disablePerspectiveProjectionField();
|
||||
setShowGridBox( false );
|
||||
meshMode.setValue( RiaDefines::MeshModeType::NO_MESH );
|
||||
surfaceMode.setValue( FAULTS );
|
||||
setFaultVisParameters();
|
||||
scheduleCreateDisplayModelAndRedraw();
|
||||
@@ -207,13 +212,14 @@ void RimEclipseContourMapView::onCreateDisplayModel()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseContourMapView::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
uiOrdering.add( &m_eclipseCase );
|
||||
|
||||
caf::PdmUiGroup* viewGroup = uiOrdering.addNewGroup( "Viewer" );
|
||||
viewGroup->add( userDescriptionField() );
|
||||
viewGroup->add( backgroundColorField() );
|
||||
viewGroup->add( &m_showAxisLines );
|
||||
viewGroup->add( &m_showScaleLegend );
|
||||
|
||||
uiOrdering.add( &m_eclipseCase );
|
||||
viewGroup->add( &m_showFaultLines );
|
||||
|
||||
caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup( "Contour Map Name" );
|
||||
nameConfig()->uiOrdering( uiConfigName, *nameGroup );
|
||||
@@ -492,6 +498,10 @@ void RimEclipseContourMapView::fieldChangedByUi( const caf::PdmFieldHandle* chan
|
||||
onUpdateLegends();
|
||||
scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
else if ( changedField == &m_showFaultLines )
|
||||
{
|
||||
scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -602,3 +612,19 @@ void RimEclipseContourMapView::zoomAll()
|
||||
|
||||
RimEclipseView::zoomAll();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseContourMapView::isFaultLinesVisible() const
|
||||
{
|
||||
return meshMode() == RiaDefines::MeshModeType::FAULTS_MESH;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseContourMapView::setFaultLinesVisible( const bool& visible )
|
||||
{
|
||||
meshMode.setValue( visible ? RiaDefines::MeshModeType::FAULTS_MESH : RiaDefines::MeshModeType::NO_MESH );
|
||||
}
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimNameConfig.h"
|
||||
|
||||
#include "cafPdmProxyValueField.h"
|
||||
|
||||
enum class RimLegendConfigChangeType;
|
||||
class RimEclipseContourMapProjection;
|
||||
@@ -78,12 +79,18 @@ protected:
|
||||
|
||||
void onLegendConfigChanged( const caf::SignalEmitter* emitter, RimLegendConfigChangeType changeType );
|
||||
|
||||
private:
|
||||
bool isFaultLinesVisible() const;
|
||||
void setFaultLinesVisible( const bool& visible );
|
||||
|
||||
private:
|
||||
cvf::ref<RivContourMapProjectionPartMgr> m_contourMapProjectionPartMgr;
|
||||
caf::PdmChildField<RimEclipseContourMapProjection*> m_contourMapProjection;
|
||||
caf::PdmField<bool> m_showAxisLines;
|
||||
caf::PdmField<bool> m_showScaleLegend;
|
||||
cvf::Vec3d m_cameraPositionLastUpdate;
|
||||
|
||||
caf::PdmProxyValueField<bool> m_showFaultLines;
|
||||
caf::PdmField<bool> m_showAxisLines;
|
||||
caf::PdmField<bool> m_showScaleLegend;
|
||||
cvf::Vec3d m_cameraPositionLastUpdate;
|
||||
|
||||
const static cvf::Mat4d sm_defaultViewMatrix;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user