src/actionsEdit.cc

changeset 767
44f0d5322628
parent 757
8ab9fa53142b
child 768
29e6c5552388
--- a/src/actionsEdit.cc	Mon May 05 17:09:25 2014 +0300
+++ b/src/actionsEdit.cc	Mon May 05 17:18:01 2014 +0300
@@ -306,12 +306,12 @@
 
 	for (LDObject* obj : selection())
 	{
-		if (obj->vertices() < 2)
+		if (obj->numVertices() < 2)
 			continue;
 
 		int ln = obj->lineNumber();
 
-		for (int i = 0; i < obj->vertices(); ++i)
+		for (int i = 0; i < obj->numVertices(); ++i)
 		{
 			LDVertex* vert = new LDVertex;
 			vert->pos = obj->vertex (i);
@@ -454,9 +454,9 @@
 	// Apply the above matrix to everything
 	for (LDObject* obj : sel)
 	{
-		if (obj->vertices())
+		if (obj->numVertices())
 		{
-			for (int i = 0; i < obj->vertices(); ++i)
+			for (int i = 0; i < obj->numVertices(); ++i)
 			{
 				Vertex v = obj->vertex (i);
 				rotateVertex (v, rotpoint, transform);
@@ -545,7 +545,7 @@
 		}
 		else
 		{
-			for (int i = 0; i < obj->vertices(); ++i)
+			for (int i = 0; i < obj->numVertices(); ++i)
 			{
 				Vertex v = obj->vertex (i);
 				v.apply ([](Axis, double& a) { roundToDecimals (a, 3); });
@@ -609,7 +609,7 @@
 
 	for (LDObject* obj : selection())
 	{
-		for (int i = 0; i < obj->vertices(); ++i)
+		for (int i = 0; i < obj->numVertices(); ++i)
 		{
 			Vertex v = obj->vertex (i);
 
@@ -655,7 +655,7 @@
 
 	for (LDObject* obj : selection())
 	{
-		for (int i = 0; i < obj->vertices(); ++i)
+		for (int i = 0; i < obj->numVertices(); ++i)
 		{
 			Vertex v = obj->vertex (i);
 

mercurial