mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4981 Fix well target manipulators not responding
Moved z scale change notification to method setting zscale for label Was always done, and recreated target manipulators at first mousemove Avoid updating cached values in scene on repeated calls to show gridbox
This commit is contained in:
parent
c6e4641725
commit
3c3c207bbc
@ -93,6 +93,7 @@ std::unique_ptr<QCursor> RiuViewer::s_hoverCursor;
|
||||
RiuViewer::RiuViewer( const QGLFormat& format, QWidget* parent )
|
||||
: caf::Viewer( format, parent )
|
||||
, m_isNavigationRotationEnabled( true )
|
||||
, m_zScale( 1.0 )
|
||||
{
|
||||
cvf::Font* standardFont = RiaGuiApplication::instance()->defaultSceneFont();
|
||||
QFont font = RiaGuiApplication::instance()->font();
|
||||
@ -490,7 +491,12 @@ void RiuViewer::showZScaleLabel( bool enable )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::setZScale( int scale )
|
||||
{
|
||||
bool isScaleChanged = m_zScale != scale;
|
||||
m_zScale = scale;
|
||||
|
||||
m_zScaleLabel->setText( QString( "Z: %1" ).arg( scale ) );
|
||||
|
||||
if ( isScaleChanged ) m_selectionVisualizerManager->updateVisibleEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -531,14 +537,16 @@ void RiuViewer::setHistogramPercentiles( double pmin, double pmax, double mean )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::showGridBox( bool enable )
|
||||
{
|
||||
this->removeStaticModel( m_gridBoxGenerator->model() );
|
||||
this->removeStaticModel( m_comparisonGridBoxGenerator->model() );
|
||||
|
||||
if ( enable )
|
||||
{
|
||||
this->addStaticModelOnce( m_gridBoxGenerator->model(), false );
|
||||
this->addStaticModelOnce( m_comparisonGridBoxGenerator->model(), true );
|
||||
}
|
||||
else
|
||||
{
|
||||
this->removeStaticModel( m_gridBoxGenerator->model() );
|
||||
this->removeStaticModel( m_comparisonGridBoxGenerator->model() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -930,8 +938,6 @@ void RiuViewer::updateGridBoxData( double scaleZ,
|
||||
m_comparisonGridBoxGenerator->setGridBoxDomainCoordBoundingBox( domainCoordBoundingBox );
|
||||
|
||||
m_comparisonGridBoxGenerator->createGridBoxParts();
|
||||
|
||||
m_selectionVisualizerManager->updateVisibleEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -175,6 +175,7 @@ private:
|
||||
QLabel* m_zScaleLabel;
|
||||
bool m_showZScaleLabel;
|
||||
bool m_hideZScaleCheckbox;
|
||||
double m_zScale;
|
||||
|
||||
caf::QStyledProgressBar* m_animationProgress;
|
||||
bool m_showAnimProgress;
|
||||
|
Loading…
Reference in New Issue
Block a user