mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
@@ -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 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user