--- a/src/glRenderer.cpp Thu Jan 04 19:24:40 2018 +0200 +++ b/src/glRenderer.cpp Thu Jan 04 19:40:16 2018 +0200 @@ -78,7 +78,7 @@ m_initialized (false) { m_isPicking = false; - m_camera = (ECamera) Config->camera(); + m_camera = (ECamera) config.camera(); m_drawToolTip = false; m_currentEditMode = AbstractEditMode::createByType (this, EditModeType::Select); m_panning = false; @@ -174,7 +174,7 @@ glShadeModel (GL_SMOOTH); glEnable (GL_MULTISAMPLE); - if (Config->antiAliasedLines()) + if (config.antiAliasedLines()) { glEnable (GL_LINE_SMOOTH); glEnable (GL_POLYGON_SMOOTH); @@ -264,7 +264,7 @@ initializeOpenGLFunctions(); #endif setBackground(); - glLineWidth (Config->lineThickness()); + glLineWidth (config.lineThickness()); glLineStipple (1, 0x6666); setAutoFillBackground (false); setMouseTracking (true); @@ -331,7 +331,7 @@ return; } - QColor color = Config->backgroundColor(); + QColor color = config.backgroundColor(); if (not color.isValid()) return; @@ -392,7 +392,7 @@ zoomAllToFit(); } - if (Config->drawWireframe() and not isPicking()) + if (config.drawWireframe() and not isPicking()) glPolygonMode (GL_FRONT_AND_BACK, GL_LINE); glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); @@ -446,7 +446,7 @@ } else { - if (Config->bfcRedGreenView()) + if (config.bfcRedGreenView()) { glEnable (GL_CULL_FACE); glCullFace (GL_BACK); @@ -461,7 +461,7 @@ { ComplementVboType colors; - if (Config->randomColors()) + if (config.randomColors()) colors = RandomColorsVboComplement; else colors = NormalColorsVboComplement; @@ -475,7 +475,7 @@ drawVbos (ConditionalLinesVbo, NormalColorsVboComplement, GL_LINES); glDisable (GL_LINE_STIPPLE); - if (Config->drawAxes()) + if (config.drawAxes()) { glBindBuffer (GL_ARRAY_BUFFER, m_axesVbo); glVertexPointer (3, GL_FLOAT, 0, NULL); @@ -501,9 +501,9 @@ void GLRenderer::drawVbos (SurfaceVboType surface, ComplementVboType colors, GLenum type) { // Filter this through some configuration options - if ((isOneOf (surface, QuadsVbo, TrianglesVbo) and Config->drawSurfaces() == false) - or (surface == LinesVbo and Config->drawEdgeLines() == false) - or (surface == ConditionalLinesVbo and Config->drawConditionalLines() == false)) + if ((isOneOf (surface, QuadsVbo, TrianglesVbo) and config.drawSurfaces() == false) + or (surface == LinesVbo and config.drawEdgeLines() == false) + or (surface == ConditionalLinesVbo and config.drawConditionalLines() == false)) { return; } @@ -914,7 +914,7 @@ return; m_camera = cam; - Config->setCamera ((int) cam); + config.setCamera ((int) cam); m_window->updateEditModeActions(); } @@ -1096,14 +1096,14 @@ glDisable (GL_DITHER); // Use particularly thick lines while picking ease up selecting lines. - glLineWidth (qMax<double> (Config->lineThickness(), 6.5)); + glLineWidth (qMax<double> (config.lineThickness(), 6.5)); } else { glEnable (GL_DITHER); // Restore line thickness - glLineWidth (Config->lineThickness()); + glLineWidth (config.lineThickness()); } } @@ -1540,14 +1540,14 @@ // void GLRenderer::highlightCursorObject() { - if (not Config->highlightObjectBelowCursor() and objectAtCursor() == nullptr) + if (not config.highlightObjectBelowCursor() and objectAtCursor() == nullptr) return; LDObject* newObject = nullptr; LDObject* oldObject = objectAtCursor(); qint32 newIndex; - if (m_isCameraMoving or not Config->highlightObjectBelowCursor()) + if (m_isCameraMoving or not config.highlightObjectBelowCursor()) { newIndex = 0; }