# HG changeset patch # User Teemu Piippo # Date 1486638467 -7200 # Node ID 4f4d219e527d6a6e4a4a0bcc26193130c656de7a # Parent edddb9b0db9e5a03a11f8ac4285ead44f90c2c74 Moved triangle count rendering to Canvas diff -r edddb9b0db9e -r 4f4d219e527d src/canvas.cpp --- a/src/canvas.cpp Thu Feb 09 13:05:31 2017 +0200 +++ b/src/canvas.cpp Thu Feb 09 13:07:47 2017 +0200 @@ -62,6 +62,12 @@ // Draw edit mode HUD m_currentEditMode->render(painter); + // Render triangle count + { + QPoint renderPoint {4, height() - 4 - metrics.height() - metrics.descent()}; + painter.drawText(renderPoint, format("△ %1", m_document.triangleCount())); + } + // Message log if (m_window->messageLog()) { diff -r edddb9b0db9e -r 4f4d219e527d src/glRenderer.cpp --- a/src/glRenderer.cpp Thu Feb 09 13:05:31 2017 +0200 +++ b/src/glRenderer.cpp Thu Feb 09 13:07:47 2017 +0200 @@ -622,13 +622,6 @@ int margin = 4; painter.setPen(textPen()); painter.drawText(QPoint {margin, height() - margin - metrics.descent()}, currentCameraName()); - - // Also render triangle count. - if (m_model) - { - QPoint renderPoint = {margin, height() - margin - metrics.height() - metrics.descent()}; - painter.drawText(renderPoint, format("△ %1", m_model->triangleCount())); - } } }