Hello Jasper,

I did some work on this bug and here is what I found out so far:

In stroke-style.cpp there is an SPStyle object created which is then passed to the
sp_desktop_query_style( ) function defined in desktop-style.cpp. This sp_desktop_query_style( ) then calls
objects_query_strokewidth() in style.cpp.

The interesting part I found out in objects_query_strokewidth() is in line 718:

if ( style->stroke.isNone() && !(
                 style->marker[SP_MARKER_LOC].set || // stroke width affects markers, so if there's no stroke but only markers then we should
                 style->marker[SP_MARKER_LOC_START].set || // still calculate the stroke width
                 style->marker[SP_MARKER_LOC_MID].set ||
                 style->marker[SP_MARKER_LOC_END].set))
        {
            continue;
        }

When I have un-grouped objects style->stroke.isNone() is FALSE but when I have grouped objects it becomes TRUE.

in the case of groups the continue  statement will not allow the variable(initialized to zero) that contains the value in the spin box to be set correctly and hence that is where the zero is coming from.

I temporarily removed this condition and suddenly I can use the spin box to set the stroke for grouped items. So the problem is coming from the 
Style->stroke.isNone() member(if you call it like that).
stroke is an SPIPaint object.

I looked further into this member in style.h and this is its definition:

bool isNone() const {return !currentcolor && !colorSet && !isPaintserver();} // TODO refine

I checked for both cases of grouped and un-grouped items. When there is grouped items !colorSet is true and when there are un-grouped items !colorSet is false. The rest are always false. So it has something to do with the color.

But Now I am stuck, can you please give me further clues?

Regards,
Samuel


On Thu, Sep 8, 2011 at 1:21 PM, Jasper van de Gronde <th.v.d.gronde@hccnet.nl> wrote:
What exactly would you like to know? The styles themselves are stored in
SPStyle objects (which you can find in src/style.*). And all elements in
the SVG document are represented by an SPObject (which has a pointer to
an SPStyle object), which is specialized into a whole hierarchy of
SPSomething classes (like SPRect, SPPath, etc.). The UI code for setting
the stroke width is located in src/widgets/stroke-style.cpp.

I've posted a bit of extra analysis:
https://bugs.launchpad.net/inkscape/+bug/734596

Likely there is some special casing for groups somewhere that doesn't
handle a stroke width without having a stroke (color). Just try and
figure out where the zero comes from (and/or the non-zero value when
using just a rect) and with a bit of luck it'll become clear how to
solve the problem... If not, feel free to post your findings (here
and/or with the bug report) and ask for a second opinion again.

On 08-09-11 10:10, Samuel Buttigieg wrote:
> Can someone please provide some help?
>
> On Mon, Sep 5, 2011 at 7:30 PM, Samuel Buttigieg <sambut1987@gmail.com
> <mailto:sambut1987@gmail.com>> 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
>
>
>
>
> ------------------------------------------------------------------------------
> Doing More with Less: The Next Generation Virtual Desktop
> What are the key obstacles that have prevented many mid-market businesses
> from deploying virtual desktops?   How do next-generation virtual desktops
> provide companies an easier-to-deploy, easier-to-manage and more affordable
> virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
>
>
>
> _______________________________________________
> Inkscape-devel mailing list
> Inkscape-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/inkscape-devel


------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Inkscape-devel mailing list
Inkscape-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/inkscape-devel