src/extprogs.cc

changeset 560
39085791128f
parent 557
04e140bdeb0b
child 569
0d6fce0628fe
equal deleted inserted replaced
559:5a31f6c14451 560:39085791128f
155 QList<LDObject*> objs = ref->inlineContents (LDSubfile::DeepInline); 155 QList<LDObject*> objs = ref->inlineContents (LDSubfile::DeepInline);
156 156
157 writeObjects (objs, f); 157 writeObjects (objs, f);
158 158
159 for (LDObject* obj : objs) 159 for (LDObject* obj : objs)
160 delete obj; 160 obj->deleteSelf();
161 } 161 }
162 else 162 else
163 f.write (obj->raw() + "\r\n"); 163 f.write (obj->raw() + "\r\n");
164 } 164 }
165 } 165 }
280 // Insert the new objects 280 // Insert the new objects
281 getCurrentDocument()->clearSelection(); 281 getCurrentDocument()->clearSelection();
282 282
283 for (LDObject * obj : objs) 283 for (LDObject * obj : objs)
284 { if (!obj->isScemantic()) 284 { if (!obj->isScemantic())
285 { delete obj; 285 { obj->deleteSelf();
286 continue; 286 continue;
287 } 287 }
288 288
289 getCurrentDocument()->addObject (obj); 289 getCurrentDocument()->addObject (obj);
290 obj->select(); 290 obj->select();

mercurial