src/addObjectDialog.cpp

changeset 276
a21e49914264
parent 269
2d71227f35cb
child 279
86a325a6b7c7
--- a/src/addObjectDialog.cpp	Thu Jun 13 01:13:06 2013 +0300
+++ b/src/addObjectDialog.cpp	Thu Jun 13 02:55:47 2013 +0300
@@ -221,7 +221,7 @@
 		if (obj) {
 			for (short i = 0; i < coordCount / 3; ++i)
 			for (short j = 0; j < 3; ++j)
-				dsb_coords[(i * 3) + j]->setValue (obj->coords[i].coord (j));
+				dsb_coords[(i * 3) + j]->setValue (obj->getVertex (i).coord (j));
 		}
 		break;
 	
@@ -401,9 +401,13 @@
 		if (!obj)
 			obj = LDObject::getDefault (type);
 		
-		for (short i = 0; i < obj->vertices (); ++i)
+		for (short i = 0; i < obj->vertices (); ++i) {
+			vertex v;
 			for (const Axis ax : g_Axes)
-				obj->coords[i][ax] = dlg.dsb_coords[(i * 3) + ax]->value ();
+				v[ax] = dlg.dsb_coords[(i * 3) + ax]->value ();
+			
+			obj->setVertex (i, v);
+		}
 		break;
 	
 	case LDObject::BFC:

mercurial