# HG changeset patch # User Santeri Piippo # Date 1400281202 -10800 # Node ID e117509e1b51a4166992530226535ec33dc615d3 # Parent 0f04e34bec541c2dde7317691daba9f1292633d9 - make pick scenes always use particularly thick lines so that the line picking behavior is relayed to the mouse-over highlight diff -r 0f04e34bec54 -r e117509e1b51 src/glCompiler.cc --- a/src/glCompiler.cc Fri May 16 21:59:03 2014 +0300 +++ b/src/glCompiler.cc Sat May 17 02:00:02 2014 +0300 @@ -311,7 +311,7 @@ { // print ("Compile %1\n", g_objectOrigins[obj]); - if (obj == null || obj->document()->isImplicit()) + if (obj == null || obj->document() == null || obj->document()->isImplicit()) return; ObjectVBOInfo info; diff -r 0f04e34bec54 -r e117509e1b51 src/glRenderer.cc --- a/src/glRenderer.cc Fri May 16 21:59:03 2014 +0300 +++ b/src/glRenderer.cc Sat May 17 02:00:02 2014 +0300 @@ -1215,9 +1215,6 @@ { makeCurrent(); - // Use particularly thick lines while picking ease up selecting lines. - glLineWidth (max (cfg::lineThickness, 6.5f)); - // Clear the selection if we do not wish to add to it. if (not m_addpick) { @@ -1323,9 +1320,6 @@ if (removedObj) compileObject (removedObj); - // Restore line thickness - glLineWidth (cfg::lineThickness); - setPicking (false); m_rangepick = false; repaint(); @@ -1402,10 +1396,20 @@ m_isPicking = a; setBackground(); - if (a) + if (isPicking()) + { glDisable (GL_DITHER); + + // Use particularly thick lines while picking ease up selecting lines. + glLineWidth (max (cfg::lineThickness, 6.5)); + } else + { glEnable (GL_DITHER); + + // Restore line thickness + glLineWidth (cfg::lineThickness); + } } // =============================================================================