1213 // |
1213 // |
1214 void GLRenderer::pick (int mouseX, int mouseY) |
1214 void GLRenderer::pick (int mouseX, int mouseY) |
1215 { |
1215 { |
1216 makeCurrent(); |
1216 makeCurrent(); |
1217 |
1217 |
1218 // Use particularly thick lines while picking ease up selecting lines. |
|
1219 glLineWidth (max<double> (cfg::lineThickness, 6.5f)); |
|
1220 |
|
1221 // Clear the selection if we do not wish to add to it. |
1218 // Clear the selection if we do not wish to add to it. |
1222 if (not m_addpick) |
1219 if (not m_addpick) |
1223 { |
1220 { |
1224 LDObjectList oldsel = selection(); |
1221 LDObjectList oldsel = selection(); |
1225 getCurrentDocument()->clearSelection(); |
1222 getCurrentDocument()->clearSelection(); |
1400 void GLRenderer::setPicking (const bool& a) |
1394 void GLRenderer::setPicking (const bool& a) |
1401 { |
1395 { |
1402 m_isPicking = a; |
1396 m_isPicking = a; |
1403 setBackground(); |
1397 setBackground(); |
1404 |
1398 |
1405 if (a) |
1399 if (isPicking()) |
|
1400 { |
1406 glDisable (GL_DITHER); |
1401 glDisable (GL_DITHER); |
|
1402 |
|
1403 // Use particularly thick lines while picking ease up selecting lines. |
|
1404 glLineWidth (max<double> (cfg::lineThickness, 6.5)); |
|
1405 } |
1407 else |
1406 else |
|
1407 { |
1408 glEnable (GL_DITHER); |
1408 glEnable (GL_DITHER); |
|
1409 |
|
1410 // Restore line thickness |
|
1411 glLineWidth (cfg::lineThickness); |
|
1412 } |
1409 } |
1413 } |
1410 |
1414 |
1411 // ============================================================================= |
1415 // ============================================================================= |
1412 // |
1416 // |
1413 Matrix GLRenderer::getCircleDrawMatrix (double scale) |
1417 Matrix GLRenderer::getCircleDrawMatrix (double scale) |