]> Git trees. - libqmvoc.git/commitdiff
re-enable opengl selection
authorBenoît Jacob <jacob.benoit.1@gmail.com>
Wed, 18 Oct 2006 19:32:37 +0000 (19:32 +0000)
committerBenoît Jacob <jacob.benoit.1@gmail.com>
Wed, 18 Oct 2006 19:32:37 +0000 (19:32 +0000)
M    kalzium/src/kalziumglwidget.cpp

svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglwidget.cpp; revision=596866

kalzium/kalziumglwidget.cpp

index f165deec3fc05d7c6712c870a4300eeaa9c4d839..a99538e8caab2c017c5c4ab705b55a5920c24581 100644 (file)
@@ -250,7 +250,7 @@ void KalziumGLWidget::renderHighlighting()
 
        if( m_clickedAtom )
        {
-               Color( 0.8, 0.4, 1.0, 0.7 ).applyAsMaterials();
+               Color( 1.0, 1.0, 1.0, 0.4 ).applyAsMaterials();
                glLoadName( m_clickedAtom->GetIdx() );
                m_sphere.draw( m_clickedAtom->GetVector(),
                        0.18 + m_molStyle.getAtomRadius( m_clickedAtom ) );
@@ -325,11 +325,7 @@ void KalziumGLWidget::mousePressEvent( QMouseEvent * event )
                m_movedSinceLeftButtonPressed = false;
                m_lastDraggingPosition = event->pos ();
                m_initialDraggingPosition = event->pos ();
-#if 0
                computeClickedAtom( event->pos () );
-               if( m_clickedAtom )
-                       kDebug()<<m_clickedAtom->GetIdx()<<endl;
-#endif
                updateGL();
        }
 }
@@ -340,7 +336,6 @@ void KalziumGLWidget::mouseReleaseEvent( QMouseEvent * event )
        {
                m_isLeftButtonPressed = false;
 
-#if 0
                if( m_clickedAtom && ! m_movedSinceLeftButtonPressed )
                {
                        if( m_selectedAtoms.contains( m_clickedAtom ) )
@@ -349,10 +344,9 @@ void KalziumGLWidget::mouseReleaseEvent( QMouseEvent * event )
                                        m_clickedAtom );
                        }
                        else m_selectedAtoms.append( m_clickedAtom );
-                       updateGL();
                }
-#endif
                m_clickedAtom = 0;
+               updateGL();
        }
 }