157 { |
157 { |
158 // Don't bother during program termination |
158 // Don't bother during program termination |
159 if (IsExiting()) |
159 if (IsExiting()) |
160 return; |
160 return; |
161 |
161 |
|
162 for (LDObjectPtr obj : m_objects) |
|
163 obj->setSelected (false); |
|
164 |
162 g_allDocuments.removeOne (self()); |
165 g_allDocuments.removeOne (self()); |
163 m_flags |= DOCF_IsBeingDestroyed; |
166 m_flags |= DOCF_IsBeingDestroyed; |
164 delete m_history; |
167 delete m_history; |
165 delete m_gldata; |
168 delete m_gldata; |
166 } |
169 } |