src/lddocument.cpp

changeset 1424
737df8e904af
parent 1400
ae83213bdd63
child 1440
265b2e95a8e8
equal deleted inserted replaced
1423:6608db56b047 1424:737df8e904af
27 LDDocument::LDDocument (DocumentManager* parent) : 27 LDDocument::LDDocument (DocumentManager* parent) :
28 Model {parent}, 28 Model {parent},
29 HierarchyElement (parent), 29 HierarchyElement (parent),
30 m_history (new EditHistory (this)), 30 m_history (new EditHistory (this)),
31 m_savePosition(-1), 31 m_savePosition(-1),
32 m_tabIndex(-1), 32 m_tabIndex(-1)
33 m_manager (parent)
34 { 33 {
35 connect( 34 connect(
36 this, 35 this,
37 SIGNAL(objectAdded(QModelIndex)), 36 SIGNAL(objectAdded(QModelIndex)),
38 this, 37 this,
163 void LDDocument::close() 162 void LDDocument::close()
164 { 163 {
165 if (not isFrozen()) 164 if (not isFrozen())
166 { 165 {
167 setFrozen(true); 166 setFrozen(true);
168 m_manager->documentClosed(this); 167 documentManager()->documentClosed(this);
169 } 168 }
170 } 169 }
171 170
172 // ============================================================================= 171 // =============================================================================
173 // 172 //
517 if (not m_isInlining) 516 if (not m_isInlining)
518 { 517 {
519 m_isInlining = true; 518 m_isInlining = true;
520 519
521 // First ask the manager to deal with this inline (this takes logoed studs into account) 520 // First ask the manager to deal with this inline (this takes logoed studs into account)
522 if (not m_manager->preInline(this, model, deep, renderinline)) 521 if (not documentManager()->preInline(this, model, deep, renderinline))
523 { 522 {
524 for (LDObject* object : objects()) 523 for (LDObject* object : objects())
525 { 524 {
526 // Skip those without effect on the model meaning 525 // Skip those without effect on the model meaning
527 if (object->isScemantic()) 526 if (object->isScemantic())

mercurial