52 SIGNAL(aboutToRemoveObject(QModelIndex)), |
52 SIGNAL(aboutToRemoveObject(QModelIndex)), |
53 this, |
53 this, |
54 SLOT(handleImminentObjectRemoval(QModelIndex)), |
54 SLOT(handleImminentObjectRemoval(QModelIndex)), |
55 Qt::DirectConnection |
55 Qt::DirectConnection |
56 ); |
56 ); |
|
57 connect( |
|
58 this, |
|
59 &Model::modelChanged, |
|
60 [&]() |
|
61 { |
|
62 this->m_needsRecache = true; |
|
63 } |
|
64 ); |
57 } |
65 } |
58 |
66 |
59 LDDocument::~LDDocument() |
67 LDDocument::~LDDocument() |
60 { |
68 { |
61 m_isBeingDestroyed = true; |
69 m_isBeingDestroyed = true; |
442 { |
450 { |
443 if (m_needsRecache) |
451 if (m_needsRecache) |
444 { |
452 { |
445 m_vertices.clear(); |
453 m_vertices.clear(); |
446 Model model {m_documents}; |
454 Model model {m_documents}; |
447 inlineContents(model, true, true); |
455 this->inlineContents(model, true, true); |
448 |
456 |
449 for (LDObject* obj : model.objects()) |
457 for (LDObject* obj : model.objects()) |
450 { |
458 { |
451 if (obj->type() == LDObjectType::SubfileReference) |
459 if (obj->type() == LDObjectType::SubfileReference) |
452 { |
460 { |