src/glRenderer.cpp

changeset 1218
e0b59d183f96
parent 1217
314e12e23c3a
child 1219
8e39b5d7c562
--- a/src/glRenderer.cpp	Thu Jan 04 19:44:26 2018 +0200
+++ b/src/glRenderer.cpp	Thu Jan 04 19:52:24 2018 +0200
@@ -88,7 +88,7 @@
 	m_messageLog = new MessageManager(this);
 	m_messageLog->setRenderer(this);
 	m_width = m_height = -1;
-	m_position3D = Origin;
+	m_position3D = Vertex {};
 	m_toolTipTimer = new QTimer(this);
 	m_toolTipTimer->setSingleShot(true);
 	m_isCameraMoving = false;
@@ -537,7 +537,7 @@
 Vertex GLRenderer::convert2dTo3d(const QPoint& pos2d, bool snap) const
 {
 	if (camera() == EFreeCamera)
-		return Origin;
+		return {};
 
 	Vertex pos3d;
 	const LDFixedCamera* cam = &g_FixedCameras[camera()];
@@ -852,7 +852,7 @@
 #endif
 
 	// Calculate 3d position of the cursor
-	m_position3D = (camera() != EFreeCamera) ? convert2dTo3d(m_mousePosition, true) : Origin;
+	m_position3D = (camera() != EFreeCamera) ? convert2dTo3d(m_mousePosition, true) : Vertex {};
 
 	highlightCursorObject();
 	update();
@@ -1220,7 +1220,7 @@
 	const double negXFac = g_FixedCameras[cam].negatedX ? -1 : 1,
 		negYFac = g_FixedCameras[cam].negatedY ? -1 : 1;
 
-	info.v0 = info.v1 = Origin;
+	info.v0 = info.v1 = Vertex {};
 	info.v0.setCoordinate(x2d, -(info.ox * info.lw * negXFac) / img->width());
 	info.v0.setCoordinate(y2d,(info.oy * info.lh * negYFac) / img->height());
 	info.v1.setCoordinate(x2d, info.v0[x2d] + info.lw);
@@ -1594,7 +1594,7 @@
 		LDSubfileReference* ref = LDSpawn<LDSubfileReference>();
 		ref->setColor(MainColor);
 		ref->setFileInfo(m_documents->getDocumentByName(primitiveName));
-		ref->setPosition(Origin);
+		ref->setPosition(Vertex {});
 		ref->setTransform(IdentityMatrix);
 		currentDocument()->insertObj(m_window->suggestInsertPoint(), ref);
 		ref->select();

mercurial