Logo Search packages:      
Sourcecode: inkscape version File versions

void ec_shape_event_attr_changed ( Inkscape::XML::Node ,
gchar const *  name,
gchar const *  ,
gchar const *  ,
bool  const,
gpointer const   data 
)

Called when SPEventContext subclass node attribute changed.

Definition at line 1042 of file event-context.cpp.

References SPEventContext::desktop, SPEventContext::shape_knot_holder, Inkscape::Selection::singleItem(), SP_ATTRIBUTE_IS_CSS, and sp_attribute_lookup().

{
    if (!name
            || !strcmp(name, "style")
            || SP_ATTRIBUTE_IS_CSS(sp_attribute_lookup(name))) {
        // no need to regenrate knotholder if only style changed
        return;
    }

    SPEventContext *ec = SP_EVENT_CONTEXT(data);

    if (ec->shape_knot_holder) {
        sp_knot_holder_destroy(ec->shape_knot_holder);
    }
    ec->shape_knot_holder = NULL;

    SPDesktop *desktop = ec->desktop;

    SPItem *item = sp_desktop_selection(desktop)->singleItem();

    if (item) {
        ec->shape_knot_holder = sp_item_knot_holder(item, desktop);
    }
}


Generated by  Doxygen 1.6.0   Back to index