Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit bc012232 authored by Frédéric Larue's avatar Frédéric Larue
Browse files

GLViewer modified so that selection can be disabled.

parent b9d0ee43
......@@ -196,6 +196,7 @@ void GLViewer::init( DisplayDoF dof )
// Initialize selection tools.
m_IsSelectionAllowed = true;
m_SelectionEnabled = false;
if( m_SelectionTools.empty() )
......@@ -1788,6 +1789,9 @@ bool GLViewer::event( QEvent *evt )
QKeyEvent *kevt = static_cast<QKeyEvent*>( evt );
if( kevt->key() == Qt::Key_Tab )
{
if( !m_IsSelectionAllowed )
return true;
makeCurrent();
if( !isSelectionEnabled() )
......@@ -2415,6 +2419,14 @@ void GLViewer::setFovY( float fovY )
}
void GLViewer::setSelectionAllowed( bool allowed )
{
m_IsSelectionAllowed = allowed;
if( !allowed && isSelectionEnabled() )
toggleSelection();
}
void GLViewer::setSelectionEnabled( bool enabled )
{
makeCurrent();
......
......@@ -241,7 +241,7 @@ public:
void paintGL();
virtual void resizeGL( int width, int height );
inline void setSelectionAllowed( bool selectionAllowed ) { m_IsSelectionAllowed = selectionAllowed; }
void setSelectionAllowed( bool allowed );
inline bool isSelectionAllowed() const { return m_IsSelectionAllowed; }
inline void setParametersDisplayed( bool displayed ) { ((QWidget*) m_DisplayOptionsLayout->parent())->setVisible( displayed ); }
inline bool areParametersDisplayed() const { return ((QWidget*) m_DisplayOptionsLayout->parent())->isVisible(); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment