Fixed the free camera icon not showing up anymore.

Tue, 14 Feb 2017 08:15:58 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 14 Feb 2017 08:15:58 +0200
changeset 1132
825dd975588d
parent 1131
03aa7091cb4a
child 1133
47f6db5ea24d

Fixed the free camera icon not showing up anymore.

src/glRenderer.cpp file | annotate | diff | comparison | revisions
--- a/src/glRenderer.cpp	Tue Feb 14 08:13:26 2017 +0200
+++ b/src/glRenderer.cpp	Tue Feb 14 08:15:58 2017 +0200
@@ -103,12 +103,10 @@
 	for (CameraIcon& cameraIcon : m_cameraIcons)
 	{
 		int row = i / columns;
-		int column;
+		int column = i % columns;
 
-		if (i < firstAtLastRow)
-			column = i % columns;
-		else
-			column = i + columns - (countof(m_cameras) % columns);
+		if (i >= firstAtLastRow)
+			column += columns - (countof(m_cameras) % columns);
 
 		int x1 = width() - 48 + (column * 16) - 1;
 		int y1 = (row * 16) + 1;

mercurial