src/misc.cc

changeset 614
aac6f0021070
parent 606
3dd6f343ec06
child 617
f5059d144438
--- a/src/misc.cc	Fri Jan 10 11:09:38 2014 +0200
+++ b/src/misc.cc	Fri Jan 10 15:28:29 2014 +0200
@@ -211,18 +211,20 @@
 // -----------------------------------------------------------------------------
 Vertex rotPoint (const QList<LDObject*>& objs)
 {
-	LDBoundingBox box;
-
 	switch (edit_rotpoint)
 	{
 		case ObjectOrigin:
 		{
+			LDBoundingBox box;
+
 			// Calculate center vertex
 			for (LDObject* obj : objs)
+			{
 				if (obj->hasMatrix())
 					box << dynamic_cast<LDMatrixObject*> (obj)->getPosition();
 				else
 					box << obj;
+			}
 
 			return box.center();
 		}

mercurial