Commit bfd39882 authored by Frédéric Larue's avatar Frédéric Larue

Label display in GLViewer now managed in the same way for 2D or 3D Displayables.

parent 4465df05
......@@ -971,7 +971,7 @@ void GLViewer::paintGL()
glMultMatrixf( (*dinfo)->GetTransform().data() );
glPushAttrib( GL_ALL_ATTRIB_BITS );
(*dinfo)->displayable->onDisplay( *(*dinfo)->displayable->getSource()->GetDisplayOptions() );
displayLabel( (*dinfo)->displayable );
//displayLabel( (*dinfo)->displayable );
if( (*dinfo)->currentSelectionMgr )
(*dinfo)->currentSelectionMgr->onDisplay( this, (*dinfo)->GetTransform() );
glPopAttrib();
......@@ -993,7 +993,7 @@ void GLViewer::paintGL()
glDepthMask( GL_TRUE );
// Display the label of the object under the mouse cursor.
if( dof() == DISPLAY_DOF_3D && m_BelowCursor )
if( /*dof() == DISPLAY_DOF_3D &&*/ m_BelowCursor )
{
double textX, textY;
//QVector3D c = m_BelowCursor->GetTransform().map( m_BelowCursor->boundingBox.Center() );
......@@ -1003,7 +1003,9 @@ void GLViewer::paintGL()
textY = c.y();
QString label = m_BelowCursor->displayable->label();
QFont f( font().family(), 10, QFont::Bold );
QFont f = QApplication::font();
f.setPointSize( 10 );
f.setWeight( QFont::Bold );
Qt::Alignment align = static_cast<Qt::Alignment>( Qt::AlignHCenter | Qt::AlignBottom );
......
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