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 |
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(); |