mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2412 2D Navigation only for Intersectino Views
This commit is contained in:
@@ -79,7 +79,7 @@ const double RI_MIN_NEARPLANE_DISTANCE = 0.1;
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuViewer::RiuViewer(const QGLFormat& format, QWidget* parent)
|
||||
: caf::Viewer(format, parent)
|
||||
: caf::Viewer(format, parent), m_isNavigationRotationEnabled(true)
|
||||
{
|
||||
cvf::Font* standardFont = RiaApplication::instance()->standardFont();
|
||||
m_axisCross = new cvf::OverlayAxisCross(m_mainCamera.p(), standardFont);
|
||||
@@ -589,6 +589,17 @@ void RiuViewer::addColorLegendToBottomLeftCorner(cvf::OverlayItem* legend)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::enableNavigationRotation(bool enable)
|
||||
{
|
||||
auto tbNavPol = dynamic_cast<caf::TrackBallBasedNavigation*>(m_navigationPolicy.p());
|
||||
m_isNavigationRotationEnabled = enable;
|
||||
|
||||
if (tbNavPol) tbNavPol->enableRotation(m_isNavigationRotationEnabled);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -616,6 +627,8 @@ void RiuViewer::updateNavigationPolicy()
|
||||
CVF_ASSERT(0);
|
||||
break;
|
||||
}
|
||||
|
||||
enableNavigationRotation(m_isNavigationRotationEnabled);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user