src/gldraw.cc

changeset 617
f5059d144438
parent 616
92170185dbb6
child 619
8bfe34c6ab1a
equal deleted inserted replaced
616:92170185dbb6 617:f5059d144438
993 } break; 993 } break;
994 994
995 case LDObject::ESubfile: 995 case LDObject::ESubfile:
996 { 996 {
997 LDSubfile* ref = static_cast<LDSubfile*> (obj); 997 LDSubfile* ref = static_cast<LDSubfile*> (obj);
998 QList<LDObject*> objs; 998 LDObjectList objs;
999 999
1000 objs = ref->inlineContents (LDSubfile::DeepCacheInline | LDSubfile::RendererInline); 1000 objs = ref->inlineContents (LDSubfile::DeepCacheInline | LDSubfile::RendererInline);
1001 bool oldinvert = g_glInvert; 1001 bool oldinvert = g_glInvert;
1002 1002
1003 if (ref->getTransform().getDeterminant() < 0) 1003 if (ref->getTransform().getDeterminant() < 0)
1322 glLineWidth (max<double> (gl_linethickness, 6.5f)); 1322 glLineWidth (max<double> (gl_linethickness, 6.5f));
1323 1323
1324 // Clear the selection if we do not wish to add to it. 1324 // Clear the selection if we do not wish to add to it.
1325 if (!m_addpick) 1325 if (!m_addpick)
1326 { 1326 {
1327 QList<LDObject*> oldsel = selection(); 1327 LDObjectList oldsel = selection();
1328 getCurrentDocument()->clearSelection(); 1328 getCurrentDocument()->clearSelection();
1329 1329
1330 for (LDObject* obj : oldsel) 1330 for (LDObject* obj : oldsel)
1331 compileObject (obj); 1331 compileObject (obj);
1332 } 1332 }
1460 1460
1461 // Use the crosshair cursor when drawing. 1461 // Use the crosshair cursor when drawing.
1462 setCursor (Qt::CrossCursor); 1462 setCursor (Qt::CrossCursor);
1463 1463
1464 // Clear the selection when beginning to draw. 1464 // Clear the selection when beginning to draw.
1465 QList<LDObject*> priorsel = selection(); 1465 LDObjectList priorsel = selection();
1466 getCurrentDocument()->clearSelection(); 1466 getCurrentDocument()->clearSelection();
1467 1467
1468 for (LDObject* obj : priorsel) 1468 for (LDObject* obj : priorsel)
1469 compileObject (obj); 1469 compileObject (obj);
1470 1470
1508 { 1508 {
1509 (void) accept; 1509 (void) accept;
1510 1510
1511 // Clean the selection and create the object 1511 // Clean the selection and create the object
1512 QList<Vertex>& verts = m_drawedVerts; 1512 QList<Vertex>& verts = m_drawedVerts;
1513 QList<LDObject*> objs; 1513 LDObjectList objs;
1514 1514
1515 switch (getEditMode()) 1515 switch (getEditMode())
1516 { 1516 {
1517 case EDrawMode: 1517 case EDrawMode:
1518 { 1518 {
1727 for (int i = 0; i < obj->vertices(); ++i) 1727 for (int i = 0; i < obj->vertices(); ++i)
1728 verts << obj->getVertex (i); 1728 verts << obj->getVertex (i);
1729 } elif (obj->getType() == LDObject::ESubfile) 1729 } elif (obj->getType() == LDObject::ESubfile)
1730 { 1730 {
1731 LDSubfile* ref = static_cast<LDSubfile*> (obj); 1731 LDSubfile* ref = static_cast<LDSubfile*> (obj);
1732 QList<LDObject*> objs = ref->inlineContents (LDSubfile::DeepCacheInline); 1732 LDObjectList objs = ref->inlineContents (LDSubfile::DeepCacheInline);
1733 1733
1734 for (LDObject* obj : objs) 1734 for (LDObject* obj : objs)
1735 { 1735 {
1736 verts << getVertices (obj); 1736 verts << getVertices (obj);
1737 obj->deleteSelf(); 1737 obj->deleteSelf();

mercurial