/// Delete all regular children of this item (not mask or clip). void DrawingItem::clearChildren() { if (_children.empty()) return; _markForRendering(); // prevent children from referencing the parent during deletion // this way, children won't try to remove themselves from a list // from which they have already been removed by clear_and_dispose for (ChildrenList::iterator i = _children.begin(); i != _children.end(); ++i) { i->_parent = NULL; i->_child_type = CHILD_ORPHAN; } _children.clear_and_dispose(DeleteDisposer()); _markForUpdate(STATE_ALL, false); }
void DrawingText::clear() { _markForRendering(); _children.clear_and_dispose(DeleteDisposer()); }