#4862 Lock scale Z in comparison view to follow the main view.

#4858 Make timestep independent in comparison view. Make Linked Views timestep linking work
This commit is contained in:
Jacob Støren
2019-10-22 13:39:18 +02:00
parent eee8467e02
commit 016f26725a
6 changed files with 90 additions and 17 deletions

View File

@@ -1790,7 +1790,7 @@ void RiuMainWindow::updateScaleValue()
{
Rim3dView* view = RiaApplication::instance()->activeReservoirView();
bool isRegularReservoirView = view && dynamic_cast<RimEclipseContourMapView*>( view ) == nullptr;
if ( isRegularReservoirView )
if ( isRegularReservoirView && view->isScaleZEditable() )
{
m_scaleFactor->setEnabled( true );

View File

@@ -182,6 +182,7 @@ RiuViewer::RiuViewer( const QGLFormat& format, QWidget* parent )
m_scaleLegend->setOrientation( caf::OverlayScaleLegend::HORIZONTAL );
m_comparisonWindowMover = new RiuComparisonViewMover( this );
this->setComparisonViewToFollowAnimation(false);
}
//--------------------------------------------------------------------------------------------------
@@ -309,6 +310,18 @@ void RiuViewer::slotSetCurrentFrame( int frameIndex )
{
viewLinker->updateTimeStep( dynamic_cast<RimGridView*>( m_rimView.p() ), frameIndex );
}
// Update views using this as comparison
Rim3dView* view = dynamic_cast<Rim3dView*>( m_rimView.p() );
if (view)
{
std::set<Rim3dView*> containingViews = view->viewsUsingThisAsComparisonView();
for ( auto view : containingViews )
{
view->updateCurrentTimeStepAndRedraw();
}
}
}
}