Sun, 21 Apr 2013 16:46:42 +0300
Rotate subfiles and radials by their origin and not by their contents' bboxes.
gui_editactions.cpp | file | annotate | diff | comparison | revisions |
--- a/gui_editactions.cpp Sun Apr 21 16:36:20 2013 +0300 +++ b/gui_editactions.cpp Sun Apr 21 16:46:42 2013 +0300 @@ -592,11 +592,16 @@ ); // Calculate center vertex - for (LDObject* obj : sel) - box << obj; + for (LDObject* obj : sel) { + if (obj->getType () == OBJ_Subfile) + box << static_cast<LDSubfile*> (obj)->vPosition; + else if (obj->getType () == OBJ_Radial) + box << static_cast<LDRadial*> (obj)->vPosition; + else + box << obj; + } origin = box.center (); - printf ("origin: %s\n", origin.getStringRep (true).chars ()); // Apply the above matrix to everything for (LDObject* obj : sel) { @@ -612,7 +617,7 @@ LDRadial* rad = static_cast<LDRadial*> (obj); queue.push_back (&rad->vPosition); - // rad->mMatrix = rad->mMatrix * transform; + rad->mMatrix = rad->mMatrix * transform; } else if (obj->getType () == OBJ_Vertex) queue.push_back (&static_cast<LDVertex*> (obj)->vPosition); }