#4894 Fix missing updates when changing zscale and using linked views.

Prepare for fix of scalez-problems with comparison view
This commit is contained in:
Jacob Støren
2019-10-21 09:01:35 +02:00
parent d8a8a615a8
commit 86cb90515b
4 changed files with 21 additions and 32 deletions

View File

@@ -497,7 +497,7 @@ void Rim3dView::updateCurrentTimeStepAndRedraw()
}
std::set<Rim3dView*> containerViews = this->viewsUsingThisAsComparisonView();
if ( !containerViews.empty() && !isUsingOverrideViewer())
if ( !containerViews.empty() && !isUsingOverrideViewer() )
{
for ( auto view : containerViews )
{
@@ -912,19 +912,6 @@ void Rim3dView::addMeasurementToModel( cvf::ModelBasicList* wellPathModelBasicLi
wellPathModelBasicList->updateBoundingBoxesRecursive();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::setScaleZAndUpdate( double scalingFactor )
{
this->scaleZ = scalingFactor;
updateScaleTransform();
this->updateGridBoxData();
this->scheduleCreateDisplayModelAndRedraw();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -986,6 +973,16 @@ void Rim3dView::updateAnnotationItems()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dView::setScaleZAndUpdate( double scalingFactor )
{
this->scaleZ = scalingFactor;
updateScaling();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -1006,14 +1003,13 @@ void Rim3dView::updateScaling()
viewer()->mainCamera()->setFromLookAt( eye, eye + dir, up );
viewer()->setPointOfInterest( poi );
updateScaleTransform();
createDisplayModelAndRedraw();
viewer()->update();
updateZScaleLabel();
}
updateScaleTransform();
updateGridBoxData();
updateZScaleLabel();
this->scheduleCreateDisplayModelAndRedraw();
}
//--------------------------------------------------------------------------------------------------
@@ -1023,7 +1019,8 @@ void Rim3dView::updateZScaleLabel()
{
// Update Z scale label
int scale = static_cast<int>( scaleZ() );
nativeOrOverrideViewer()->setZScale( scale );
if ( viewer() ) viewer()->setZScale( scale );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -294,7 +294,7 @@ void RimEclipseView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue )
{
Rim3dView::fieldChangedByUi( changedField, oldValue, newValue );
RimGridView::fieldChangedByUi( changedField, oldValue, newValue );
if ( changedField == &m_showInvalidCells )
{

View File

@@ -756,7 +756,7 @@ void RimGeoMechView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue )
{
Rim3dView::fieldChangedByUi( changedField, oldValue, newValue );
RimGridView::fieldChangedByUi( changedField, oldValue, newValue );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -418,14 +418,6 @@ void RimGridView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
viewLinker->updateCamera( this );
}
}
else if ( changedField == &m_currentTimeStep )
{
RimViewLinker* viewLinker = this->assosiatedViewLinker();
if ( viewLinker )
{
viewLinker->updateTimeStep( this, m_currentTimeStep );
}
}
}
//--------------------------------------------------------------------------------------------------