Inkscape::Selection *selection = sp_desktop_selection(desktop);
GSList const *items = NULL;
RecolorWheel* wheel = (RecolorWheel*) (((RecolorWheelSelector*)(rsel))->getWheel()) ;
RecolorWheelNode temp;
g_printf("\nWe are here: RecolorArtworkWidget::selectionModifiedCB() ! ");
if ( selection )
{
items = selection->itemList();
for (GSList const *i = items; i != NULL; i = i->next)
{
SPObject *obj=reinterpret_cast<SPObject *>(i->data);
Inkscape::XML::Node* obj_repr = obj->getRepr();
SPCSSAttr* obj_css = sp_repr_css_attr( obj_repr , "style" );
guint32 rgb32 = sp_svg_read_color( sp_repr_css_property( obj_css, "fill", "#ababab") , 0xF0F8FF );
SPColor color = SPColor (rgb32);
float rgb[3] , hsv[3];
sp_color_get_rgb_floatv (&color, rgb);
sp_color_rgb_to_hsv_floatv (hsv , temp._color[0] , temp._color[1] , temp._color[2] );
add_node_to_recolor_wheel (wheel, obj->getId() , temp );
}
}
Do you anything done in this snippet above is wrong ? Because commenting this out leads to no crashes at all. The moment this is included, everything goes to hell.