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.

Parameters:
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 549 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(), Inkscape::LayerVerb::perform(), SPObject::setTitleOrDesc(), sp_marker_prev_new(), and sp_selection_set_mask().

{
    sp_object_ref(this, NULL);
    if (propagate) {
        _delete_signal.emit(this);
    }
    if (propagate_descendants) {
        this->_sendDeleteSignalRecursive();
    }

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

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


Generated by  Doxygen 1.6.0   Back to index