314 int idx = obj->getIndex(); |
314 int idx = obj->getIndex(); |
315 |
315 |
316 for (int i = 0; i < obj->vertices(); ++i) |
316 for (int i = 0; i < obj->vertices(); ++i) |
317 { LDVertex* vert = new LDVertex; |
317 { LDVertex* vert = new LDVertex; |
318 vert->pos = obj->getVertex (i); |
318 vert->pos = obj->getVertex (i); |
319 vert->setColor (obj->color()); |
319 vert->setColor (obj->getColor()); |
320 |
320 |
321 LDFile::current()->insertObj (++idx, vert); |
321 LDFile::current()->insertObj (++idx, vert); |
322 g_win->R()->compileObject (vert); |
322 g_win->R()->compileObject (vert); |
323 ++num; |
323 ++num; |
324 } |
324 } |
460 vertex v = mo->position(); |
460 vertex v = mo->position(); |
461 rotateVertex (v, rotpoint, transform); |
461 rotateVertex (v, rotpoint, transform); |
462 mo->setPosition (v); |
462 mo->setPosition (v); |
463 |
463 |
464 // Transform the matrix |
464 // Transform the matrix |
465 mo->setTransform (mo->transform() * transform); |
465 mo->setTransform (mo->getTransform() * transform); |
466 } elif (obj->getType() == LDObject::Vertex) |
466 } elif (obj->getType() == LDObject::Vertex) |
467 { LDVertex* vert = static_cast<LDVertex*> (obj); |
467 { LDVertex* vert = static_cast<LDVertex*> (obj); |
468 vertex v = vert->pos; |
468 vertex v = vert->pos; |
469 rotateVertex (v, rotpoint, transform); |
469 rotateVertex (v, rotpoint, transform); |
470 vert->pos = v; |
470 vert->pos = v; |
649 } |
649 } |
650 |
650 |
651 // ============================================================================= |
651 // ============================================================================= |
652 // ----------------------------------------------------------------------------- |
652 // ----------------------------------------------------------------------------- |
653 static bool isColorUsed (int colnum) |
653 static bool isColorUsed (int colnum) |
654 { for (LDObject* obj : LDFile::current()->objects()) |
654 { for (LDObject* obj : LDFile::current()->getObjects()) |
655 if (obj->isColored() && obj->color() == colnum) |
655 if (obj->isColored() && obj->getColor() == colnum) |
656 return true; |
656 return true; |
657 |
657 |
658 return false; |
658 return false; |
659 } |
659 } |
660 |
660 |