On Thu, 2011-09-08 at 10:10 +0200, Samuel Buttigieg wrote:
Can someone please provide some help?
On Mon, Sep 5, 2011 at 7:30 PM, Samuel Buttigieg <sambut1987@...400...> wrote: Hello fellow inkscapers,
I am new to the scene in inkscape and i have been looking around for interesting bugs and I came across this one: https://bugs.launchpad.net/inkscape/+bug/734596 Does anyone have any extra information about this bug (code wise) as I am interested in working on this bug Best Regards, Samuel
First, let me welcome you! Any bugs you can fix will be greatly appreciated.
First you must find the code for the Fill and Stroke dialog:
ui/dialogs/fill-and-stroke.h ui/dialogs/fill-and-stroke.cpp
This seems to use the stroke-style widget:
widgets/stroke-style.h widgets/stroke-style.cpp
The Width SpinButton is created inside sp_stroke_style_line_widget_new().
A signal is connected to this linked to sp_stroke_width_changed().
This calls sp_stroke_style_scale_line() where the width should be changed for all items selected via calls to sp_repr_css_set_property.
This is a bit problematic for groups because not only is the stroke-width set on the group, but it is also set on all children which is probably unnecessary. It should either be set on just the group and unset on the children, or set on the children and not the group. But this doesn't cause the problem in the bug report.
What seems to be the problem, is that the mechanism for setting the value displayed in the entry box is not setting the correct value (it should set be set to the average width of the selected objects), and worse, this value is being used to reset the width before one even makes any changes in the entry box. So I actually see two bugs.
Normally values are set by first querying the current style through calls to sp_desktop_query_style(). This is suppose to return the average values over selected objects. It appears not to work with groups, probably because a group normally doesn't have the stroke-width set and the child objects are not being individually queried.
You'll need to trace down where this querying is done. I don't have time at the moment to look further but this should hopefully get you started.
Tav