Logo Search packages:      
Sourcecode: inkscape version File versions

void Inkscape::ObjectHierarchy::setTop ( SPObject object  ) 

Trim or expand hierarchy on top such that object becomes top entry.

Definition at line 44 of file object-hierarchy.cpp.

References _addTop(), _trimAbove(), and SPObject::isAncestorOf().

Referenced by SPDesktop::setDocument().

                                             {
    g_return_if_fail(object != NULL);

    if ( top() == object ) {
        return;
    }

    if (!top()) {
        _addTop(object);
    } else if (object->isAncestorOf(top())) {
        _addTop(object, top());
    } else if ( object == bottom() || object->isAncestorOf(bottom()) ) {
        _trimAbove(object);
    } else {
        _clear();
        _addTop(object);
    }

    _changed_signal.emit(top(), bottom());
}


Generated by  Doxygen 1.6.0   Back to index