src/gldraw.cpp

changeset 212
79c5205b807c
parent 211
8d35e631bef3
child 216
c8882ff62d61
equal deleted inserted replaced
211:8d35e631bef3 212:79c5205b807c
991 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 991 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
992 // ============================================================================= 992 // =============================================================================
993 void GLRenderer::pick (uint mouseX, uint mouseY) { 993 void GLRenderer::pick (uint mouseX, uint mouseY) {
994 GLint viewport[4]; 994 GLint viewport[4];
995 995
996 // Use particularly thick lines while picking ease up selecting lines.
997 glLineWidth (max<double> (gl_linethickness, 6.5f));
998
996 // Clear the selection if we do not wish to add to it. 999 // Clear the selection if we do not wish to add to it.
997 if (!m_addpick) { 1000 if (!m_addpick) {
998 std::vector<LDObject*> oldsel = g_win->sel (); 1001 std::vector<LDObject*> oldsel = g_win->sel ();
999 g_win->sel ().clear (); 1002 g_win->sel ().clear ();
1000 1003
1106 for (LDObject* obj : sel) 1109 for (LDObject* obj : sel)
1107 compileObject (obj); 1110 compileObject (obj);
1108 1111
1109 if (removedObj) 1112 if (removedObj)
1110 compileObject (removedObj); 1113 compileObject (removedObj);
1114
1115 // Restore line thickness
1116 glLineWidth (gl_linethickness);
1111 1117
1112 m_picking = false; 1118 m_picking = false;
1113 m_rangepick = false; 1119 m_rangepick = false;
1114 glEnable (GL_DITHER); 1120 glEnable (GL_DITHER);
1115 1121

mercurial