diff -r 4fdd74a04790 -r 413ecd6b9801 src/glRenderer.cpp --- a/src/glRenderer.cpp Sat Oct 24 13:19:27 2015 +0300 +++ b/src/glRenderer.cpp Wed Nov 18 19:05:22 2015 +0200 @@ -78,7 +78,7 @@ m_initialized (false) { m_isPicking = false; - m_camera = (ECamera) m_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 (m_config->antiAliasedLines()) + if (Config->antiAliasedLines()) { glEnable (GL_LINE_SMOOTH); glEnable (GL_POLYGON_SMOOTH); @@ -264,7 +264,7 @@ initializeOpenGLFunctions(); #endif setBackground(); - glLineWidth (m_config->lineThickness()); + glLineWidth (Config->lineThickness()); glLineStipple (1, 0x6666); setAutoFillBackground (false); setMouseTracking (true); @@ -331,7 +331,7 @@ return; } - QColor color = m_config->backgroundColor(); + QColor color = Config->backgroundColor(); if (not color.isValid()) return; @@ -392,7 +392,7 @@ zoomAllToFit(); } - if (m_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 (m_config->bfcRedGreenView()) + if (Config->bfcRedGreenView()) { glEnable (GL_CULL_FACE); glCullFace (GL_BACK); @@ -461,7 +461,7 @@ { ComplementVboType colors; - if (m_config->randomColors()) + if (Config->randomColors()) colors = RandomColorsVboComplement; else colors = NormalColorsVboComplement; @@ -475,7 +475,7 @@ drawVbos (ConditionalLinesVbo, NormalColorsVboComplement, GL_LINES); glDisable (GL_LINE_STIPPLE); - if (m_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 m_config->drawSurfaces() == false) - or (surface == LinesVbo and m_config->drawEdgeLines() == false) - or (surface == ConditionalLinesVbo and m_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; - m_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 (m_config->lineThickness(), 6.5)); + glLineWidth (qMax (Config->lineThickness(), 6.5)); } else { glEnable (GL_DITHER); // Restore line thickness - glLineWidth (m_config->lineThickness()); + glLineWidth (Config->lineThickness()); } } @@ -1540,14 +1540,14 @@ // void GLRenderer::highlightCursorObject() { - if (not m_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 m_config->highlightObjectBelowCursor()) + if (m_isCameraMoving or not Config->highlightObjectBelowCursor()) { newIndex = 0; }