diff -r 3eace926af7f -r 5fa4bf1fc781 src/toolsets/basictoolset.cpp --- a/src/toolsets/basictoolset.cpp Wed May 30 22:31:06 2018 +0300 +++ b/src/toolsets/basictoolset.cpp Mon Jun 04 23:12:40 2018 +0300 @@ -104,34 +104,37 @@ void BasicToolset::doInline (bool deep) { - for (LDSubfileReference* reference : filterByType (selectedObjects())) + for (LDObject* object : selectedObjects()) { - // Get the index of the subfile so we know where to insert the - // inlined contents. - QPersistentModelIndex referenceIndex = currentDocument()->indexOf(reference); - int row = referenceIndex.row(); - - if (referenceIndex.isValid()) + if (object->isRasterizable()) { - Model inlined {m_documents}; - reference->inlineContents( - m_documents, - currentDocument()->winding(), - inlined, - deep, - false - ); + // Get the index of the subfile so we know where to insert the + // inlined contents. + QPersistentModelIndex referenceIndex = currentDocument()->indexOf(object); + int row = referenceIndex.row(); - // Merge in the inlined objects - for (LDObject* inlinedObject : inlined.objects()) + if (referenceIndex.isValid()) { - currentDocument()->insertCopy(row, inlinedObject); - mainWindow()->select(currentDocument()->index(row)); - row += 1; + Model inlined {m_documents}; + object->rasterize( + m_documents, + currentDocument()->winding(), + inlined, + deep, + false + ); + + // Merge in the inlined objects + for (LDObject* inlinedObject : inlined.objects()) + { + currentDocument()->insertCopy(row, inlinedObject); + mainWindow()->select(currentDocument()->index(row)); + row += 1; + } + + // Delete the subfile now as it's been inlined. + currentDocument()->removeRow(referenceIndex.row()); } - - // Delete the subfile now as it's been inlined. - currentDocument()->removeRow(referenceIndex.row()); } }