Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

SPObject * SPDesktop::layerForObject ( SPObject object  ) 

Return layer that contains object.

Definition at line 396 of file desktop.cpp.

References currentRoot(), and isLayer().

Referenced by _onSelectionChanged(), and Inkscape::Selection::numberOfLayers().

                                                    {
    g_return_val_if_fail(object != NULL, NULL);

    SPObject *root=currentRoot();
    object = SP_OBJECT_PARENT(object);
    while ( object && object != root && !isLayer(object) ) {
        object = SP_OBJECT_PARENT(object);
    }
    return object;
}


Generated by  Doxygen 1.6.0   Back to index