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

static void _onSelectionChanged ( Inkscape::Selection selection,
SPDesktop desktop 
) [static]
Todo:
only change the layer for single selections, or what? This seems reasonable -- for multiple selections there can be many different layers involved.

Definition at line 1586 of file desktop.cpp.

References SPDesktop::currentLayer(), SPDesktop::layerForObject(), SPDesktop::setCurrentLayer(), and Inkscape::Selection::singleItem().

Referenced by SPDesktop::init().

{
    /** \todo
     * only change the layer for single selections, or what?
     * This seems reasonable -- for multiple selections there can be many
     * different layers involved.
     */
    SPItem *item=selection->singleItem();
    if (item) {
        SPObject *layer=desktop->layerForObject(item);
        if ( layer && layer != desktop->currentLayer() ) {
            desktop->setCurrentLayer(layer);
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index