Moved triangle count rendering to Canvas

Thu, 09 Feb 2017 13:07:47 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 09 Feb 2017 13:07:47 +0200
changeset 1105
4f4d219e527d
parent 1104
edddb9b0db9e
child 1106
7541b0209057

Moved triangle count rendering to Canvas

src/canvas.cpp file | annotate | diff | comparison | revisions
src/glRenderer.cpp file | annotate | diff | comparison | revisions
--- 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())
 	{
--- 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()));
-		}
 	}
 }
 

mercurial