mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4849 Co-visualization: Simple use of the comparison view support in the Viewer classes
The feature is ready for testing.
This commit is contained in:
@@ -140,9 +140,9 @@ void RimEclipseContourMapView::setDefaultCustomName()
|
||||
void RimEclipseContourMapView::updatePickPointAndRedraw()
|
||||
{
|
||||
appendPickPointVisToModel();
|
||||
if ( m_viewer )
|
||||
if ( nativeOrOverrideViewer() )
|
||||
{
|
||||
m_viewer->update();
|
||||
nativeOrOverrideViewer()->update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ void RimEclipseContourMapView::setFaultVisParameters()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseContourMapView::createContourMapGeometry()
|
||||
{
|
||||
if ( m_viewer && m_contourMapProjection->isChecked() )
|
||||
if ( nativeOrOverrideViewer() && m_contourMapProjection->isChecked() )
|
||||
{
|
||||
m_contourMapProjectionPartMgr->createProjectionGeometry();
|
||||
}
|
||||
@@ -296,9 +296,9 @@ void RimEclipseContourMapView::createContourMapGeometry()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseContourMapView::appendContourMapProjectionToModel()
|
||||
{
|
||||
if ( m_viewer && m_contourMapProjection->isChecked() )
|
||||
if ( nativeOrOverrideViewer() && m_contourMapProjection->isChecked() )
|
||||
{
|
||||
cvf::Scene* frameScene = m_viewer->frame( m_currentTimeStep );
|
||||
cvf::Scene* frameScene = nativeOrOverrideViewer()->frame( m_currentTimeStep, isUsingOverrideViewer() );
|
||||
if ( frameScene )
|
||||
{
|
||||
cvf::String name = "ContourMapProjection";
|
||||
@@ -322,9 +322,9 @@ void RimEclipseContourMapView::appendContourMapProjectionToModel()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseContourMapView::appendContourLinesToModel()
|
||||
{
|
||||
if ( m_viewer && m_contourMapProjection->isChecked() )
|
||||
if ( nativeOrOverrideViewer() && m_contourMapProjection->isChecked() )
|
||||
{
|
||||
cvf::Scene* frameScene = m_viewer->frame( m_currentTimeStep );
|
||||
cvf::Scene* frameScene = nativeOrOverrideViewer()->frame( m_currentTimeStep, isUsingOverrideViewer() );
|
||||
if ( frameScene )
|
||||
{
|
||||
cvf::String name = "ContourMapLines";
|
||||
@@ -349,9 +349,9 @@ void RimEclipseContourMapView::appendContourLinesToModel()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseContourMapView::appendPickPointVisToModel()
|
||||
{
|
||||
if ( m_viewer && m_contourMapProjection->isChecked() )
|
||||
if ( nativeOrOverrideViewer() && m_contourMapProjection->isChecked() )
|
||||
{
|
||||
cvf::Scene* frameScene = m_viewer->frame( m_currentTimeStep );
|
||||
cvf::Scene* frameScene = nativeOrOverrideViewer()->frame( m_currentTimeStep, isUsingOverrideViewer() );
|
||||
if ( frameScene )
|
||||
{
|
||||
cvf::String name = "ContourMapPickPoint";
|
||||
@@ -375,9 +375,16 @@ void RimEclipseContourMapView::appendPickPointVisToModel()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseContourMapView::updateLegends()
|
||||
{
|
||||
if ( m_viewer )
|
||||
if ( nativeOrOverrideViewer() )
|
||||
{
|
||||
m_viewer->removeAllColorLegends();
|
||||
if ( !isUsingOverrideViewer() )
|
||||
{
|
||||
nativeOrOverrideViewer()->removeAllColorLegends();
|
||||
}
|
||||
else if ( m_contourMapProjection && m_contourMapProjection->legendConfig() )
|
||||
{
|
||||
nativeOrOverrideViewer()->removeColorLegend( m_contourMapProjection->legendConfig()->titledOverlayFrame() );
|
||||
}
|
||||
|
||||
if ( m_contourMapProjection && m_contourMapProjection->isChecked() )
|
||||
{
|
||||
@@ -387,12 +394,12 @@ void RimEclipseContourMapView::updateLegends()
|
||||
m_contourMapProjection->updateLegend();
|
||||
if ( projectionLegend->showLegend() )
|
||||
{
|
||||
m_viewer->addColorLegendToBottomLeftCorner( projectionLegend->titledOverlayFrame() );
|
||||
nativeOrOverrideViewer()->addColorLegendToBottomLeftCorner( projectionLegend->titledOverlayFrame() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
m_viewer->showScaleLegend( m_showScaleLegend() );
|
||||
nativeOrOverrideViewer()->showScaleLegend( m_showScaleLegend() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,11 +408,11 @@ void RimEclipseContourMapView::updateLegends()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseContourMapView::updateViewWidgetAfterCreation()
|
||||
{
|
||||
if ( m_viewer )
|
||||
if ( viewer() )
|
||||
{
|
||||
m_viewer->showAxisCross( false );
|
||||
m_viewer->showEdgeTickMarksXY( true, m_showAxisLines() );
|
||||
m_viewer->enableNavigationRotation( false );
|
||||
viewer()->showAxisCross( false );
|
||||
viewer()->showEdgeTickMarksXY( true, m_showAxisLines() );
|
||||
viewer()->enableNavigationRotation( false );
|
||||
}
|
||||
|
||||
Rim3dView::updateViewWidgetAfterCreation();
|
||||
@@ -426,9 +433,9 @@ void RimEclipseContourMapView::updateViewFollowingRangeFilterUpdates()
|
||||
void RimEclipseContourMapView::onLoadDataAndUpdate()
|
||||
{
|
||||
RimEclipseView::onLoadDataAndUpdate();
|
||||
if ( m_viewer )
|
||||
if ( nativeOrOverrideViewer() )
|
||||
{
|
||||
m_viewer->setView( cvf::Vec3d( 0, 0, -1 ), cvf::Vec3d( 0, 1, 0 ) );
|
||||
nativeOrOverrideViewer()->setView( cvf::Vec3d( 0, 0, -1 ), cvf::Vec3d( 0, 1, 0 ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,7 +450,7 @@ void RimEclipseContourMapView::fieldChangedByUi( const caf::PdmFieldHandle* chan
|
||||
|
||||
if ( changedField == &m_showAxisLines )
|
||||
{
|
||||
m_viewer->showEdgeTickMarksXY( true, m_showAxisLines() );
|
||||
viewer()->showEdgeTickMarksXY( true, m_showAxisLines() );
|
||||
scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
else if ( changedField == backgroundColorField() )
|
||||
|
||||
Reference in New Issue
Block a user