Sat, 17 May 2014 02:00:02 +0300
- make pick scenes always use particularly thick lines so that the line picking behavior is relayed to the mouse-over highlight
src/glCompiler.cc | file | annotate | diff | comparison | revisions | |
src/glRenderer.cc | file | annotate | diff | comparison | revisions |
--- 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;
--- 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<double> (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<double> (cfg::lineThickness, 6.5)); + } else + { glEnable (GL_DITHER); + + // Restore line thickness + glLineWidth (cfg::lineThickness); + } } // =============================================================================