mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 08:25:03 -05: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:
1 parent
a6fe630e5f
commit
f7dccd8149
3 files changed
+42
-7
No files matched your search
@@ -156,6 +156,7 @@ void RicNewContourMapViewFeature::onActionTriggered( bool isChecked )
|
|||||||
oilField->eclipseContourMapCollection()->updateConnectedEditors();
|
oilField->eclipseContourMapCollection()->updateConnectedEditors();
|
||||||
|
|
||||||
Riu3DMainWindowTools::setExpanded( eclipseContourMap );
|
Riu3DMainWindowTools::setExpanded( eclipseContourMap );
|
||||||
|
Riu3DMainWindowTools::selectAsCurrentItem( eclipseContourMap );
|
||||||
}
|
}
|
||||||
else if ( geoMechContourMap )
|
else if ( geoMechContourMap )
|
||||||
{
|
{
|
||||||
@@ -171,6 +172,7 @@ void RicNewContourMapViewFeature::onActionTriggered( bool isChecked )
|
|||||||
geoMechContourMap->createDisplayModelAndRedraw();
|
geoMechContourMap->createDisplayModelAndRedraw();
|
||||||
geoMechContourMap->zoomAll();
|
geoMechContourMap->zoomAll();
|
||||||
Riu3DMainWindowTools::setExpanded( geoMechContourMap );
|
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_showAxisLines, "ShowAxisLines", true, "Show Axis Lines" );
|
||||||
CAF_PDM_InitField( &m_showScaleLegend, "ShowScaleLegend", true, "Show Scale Legend" );
|
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();
|
setFaultVisParameters();
|
||||||
|
|
||||||
setDefaultCustomName();
|
setDefaultCustomName();
|
||||||
@@ -169,7 +175,6 @@ void RimEclipseContourMapView::initAfterRead()
|
|||||||
|
|
||||||
disablePerspectiveProjectionField();
|
disablePerspectiveProjectionField();
|
||||||
setShowGridBox( false );
|
setShowGridBox( false );
|
||||||
meshMode.setValue( RiaDefines::MeshModeType::NO_MESH );
|
|
||||||
surfaceMode.setValue( FAULTS );
|
surfaceMode.setValue( FAULTS );
|
||||||
setFaultVisParameters();
|
setFaultVisParameters();
|
||||||
scheduleCreateDisplayModelAndRedraw();
|
scheduleCreateDisplayModelAndRedraw();
|
||||||
@@ -207,13 +212,14 @@ void RimEclipseContourMapView::onCreateDisplayModel()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseContourMapView::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
void RimEclipseContourMapView::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||||
{
|
{
|
||||||
|
uiOrdering.add( &m_eclipseCase );
|
||||||
|
|
||||||
caf::PdmUiGroup* viewGroup = uiOrdering.addNewGroup( "Viewer" );
|
caf::PdmUiGroup* viewGroup = uiOrdering.addNewGroup( "Viewer" );
|
||||||
viewGroup->add( userDescriptionField() );
|
viewGroup->add( userDescriptionField() );
|
||||||
viewGroup->add( backgroundColorField() );
|
viewGroup->add( backgroundColorField() );
|
||||||
viewGroup->add( &m_showAxisLines );
|
viewGroup->add( &m_showAxisLines );
|
||||||
viewGroup->add( &m_showScaleLegend );
|
viewGroup->add( &m_showScaleLegend );
|
||||||
|
viewGroup->add( &m_showFaultLines );
|
||||||
uiOrdering.add( &m_eclipseCase );
|
|
||||||
|
|
||||||
caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup( "Contour Map Name" );
|
caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup( "Contour Map Name" );
|
||||||
nameConfig()->uiOrdering( uiConfigName, *nameGroup );
|
nameConfig()->uiOrdering( uiConfigName, *nameGroup );
|
||||||
@@ -492,6 +498,10 @@ void RimEclipseContourMapView::fieldChangedByUi( const caf::PdmFieldHandle* chan
|
|||||||
onUpdateLegends();
|
onUpdateLegends();
|
||||||
scheduleCreateDisplayModelAndRedraw();
|
scheduleCreateDisplayModelAndRedraw();
|
||||||
}
|
}
|
||||||
|
else if ( changedField == &m_showFaultLines )
|
||||||
|
{
|
||||||
|
scheduleCreateDisplayModelAndRedraw();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -602,3 +612,19 @@ void RimEclipseContourMapView::zoomAll()
|
|||||||
|
|
||||||
RimEclipseView::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
|
#pragma once
|
||||||
|
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
#include "RimNameConfig.h"
|
|
||||||
|
#include "cafPdmProxyValueField.h"
|
||||||
|
|
||||||
enum class RimLegendConfigChangeType;
|
enum class RimLegendConfigChangeType;
|
||||||
class RimEclipseContourMapProjection;
|
class RimEclipseContourMapProjection;
|
||||||
@@ -78,12 +79,18 @@ protected:
|
|||||||
|
|
||||||
void onLegendConfigChanged( const caf::SignalEmitter* emitter, RimLegendConfigChangeType changeType );
|
void onLegendConfigChanged( const caf::SignalEmitter* emitter, RimLegendConfigChangeType changeType );
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool isFaultLinesVisible() const;
|
||||||
|
void setFaultLinesVisible( const bool& visible );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cvf::ref<RivContourMapProjectionPartMgr> m_contourMapProjectionPartMgr;
|
cvf::ref<RivContourMapProjectionPartMgr> m_contourMapProjectionPartMgr;
|
||||||
caf::PdmChildField<RimEclipseContourMapProjection*> m_contourMapProjection;
|
caf::PdmChildField<RimEclipseContourMapProjection*> m_contourMapProjection;
|
||||||
caf::PdmField<bool> m_showAxisLines;
|
|
||||||
caf::PdmField<bool> m_showScaleLegend;
|
caf::PdmProxyValueField<bool> m_showFaultLines;
|
||||||
cvf::Vec3d m_cameraPositionLastUpdate;
|
caf::PdmField<bool> m_showAxisLines;
|
||||||
|
caf::PdmField<bool> m_showScaleLegend;
|
||||||
|
cvf::Vec3d m_cameraPositionLastUpdate;
|
||||||
|
|
||||||
const static cvf::Mat4d sm_defaultViewMatrix;
|
const static cvf::Mat4d sm_defaultViewMatrix;
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user