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 1ce2e03f authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Memory leak fixed.

m_InfoBarManager in GLViewer created multiple times in init().
parent cc25fa7e
......@@ -98,7 +98,10 @@ const char* GLViewer::s_ZBufferFPG =
GLViewer::GLViewer( DisplayDoF dof,
QWidget *parent,
Qt::WindowFlags f ) : QOpenGLWidget( parent, f ), m_DisplayOptionsLayout(NULL)
Qt::WindowFlags f ) :
QOpenGLWidget( parent, f ),
m_DisplayOptionsLayout( NULL ),
m_InfoBarManager( NULL )
{
init( dof );
}
......@@ -107,7 +110,10 @@ GLViewer::GLViewer( DisplayDoF dof,
GLViewer::GLViewer( DisplayDoF dof,
const QSurfaceFormat &format,
QWidget *parent,
Qt::WindowFlags f ) : QOpenGLWidget( parent, f ), m_DisplayOptionsLayout(NULL)
Qt::WindowFlags f ) :
QOpenGLWidget( parent, f ),
m_DisplayOptionsLayout( NULL ),
m_InfoBarManager( NULL )
{
setFormat( format );
init( dof );
......@@ -159,8 +165,11 @@ void GLViewer::init( DisplayDoF dof )
m_PointSize = 2;
m_IsCullingEnabled = false;
m_InfoBarManager = new InfoBarManager( this );
m_InfoBarManager->setInfoBar( new InfoBar(), InfoBar::BOTTOM );
if( !m_InfoBarManager )
{
m_InfoBarManager = new InfoBarManager( this );
m_InfoBarManager->setInfoBar( new InfoBar(), InfoBar::BOTTOM );
}
m_IsGridDisplayed = true;
......@@ -422,7 +431,7 @@ void GLViewer::updateDisplayable( GenericUIData *m )
dinfo->displayable->release( *m->GetDisplayOptions() );
dinfo->displayable->initialize( *m->GetDisplayOptions() );
if( isSelectionEnabled() )
if( isSelectionEnabled() && dinfo->selectionMgr )
dinfo->selectionMgr->onRecompilingSelectionShader( m_SelectionCurrentTool );
updatePrimitiveCounts();
......
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