Logo Search packages:      
Sourcecode: inkscape version File versions

void SPObject::deleteObject ( bool  propagate,
bool  propagate_descendants 
) [inherited]

Deletes an object.

Detaches the object's repr, and optionally sends notification that the object has been deleted.

propagate notify observers that the object has been deleted?
propagate_descendants notify observers of children that they have been deleted?
Deletes the object reference, unparenting it from its parent.

If the propagate parameter is set to true, it emits a delete signal. If the propagate_descendants parameter is true, it recursively sends the delete signal to children.

Definition at line 539 of file sp-object.cpp.

References SPObject::_sendDeleteSignalRecursive(), SPObject::deleteObject(), sp_object_ref(), sp_object_unref(), sp_repr_parent(), and sp_repr_unparent().

Referenced by SPObject::collectOrphan(), SPObject::deleteObject(), and Inkscape::LayerVerb::perform().

    sp_object_ref(this, NULL);
    if (propagate) {
    if (propagate_descendants) {

    Inkscape::XML::Node *repr=SP_OBJECT_REPR(this);
    if (repr && sp_repr_parent(repr)) {

    if (_successor) {
        _successor->deleteObject(propagate, propagate_descendants);
    sp_object_unref(this, NULL);

Generated by  Doxygen 1.6.0   Back to index