View Issue Details

IDProjectCategoryView StatusLast Update
0010160ScribusStory Editor / Text Framespublic2011-09-15 19:35
Reportermike_p Assigned Tojghali  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.5.0svn 
Fixed in Version1.5.0svn 
Summary0010160: First line offset radio buttons un-useable
Descriptionwhen trying to use the radio buttons they keep on reverting to the first option.
Steps To Reproduce(tried on both Ubuntu and Windows)
Open scribus.
Create a new document.
Add a text frame.
Type some text.
Open properties window (eg hit F2)
Go to text section of property palette.
Click on "First Line Offset"
try selecting either "Font Ascent" or "Line Spacing"
Immediately after selecting it will revert to "Maximum Ascent".
Additional InformationI tracked the bug down.
SetId has not been called to give numerical values to the RadioButtons in the group.

FIX (thanks to estan for help with this!)
Create an enum in propertywidget_flop.h on line 25:
-----
enum FlopButtonID
    {
        RealHeightID,
        FontAscentID,
        LineSpacingID
    };
-----
add the following lines to propertywidget_flop.cpp at line number 23
-----
    flopGroup->setId(flopRealHeight,RealHeightID);
    flopGroup->setId(flopFontAscent,FontAscentID);
    flopGroup->setId(flopLineSpacing,LineSpacingID);
-----
edit propertiespallette_text.cpp,lines 958-963 to...
-----
        if( radioFlop == PropertyWidget_Flop::RealHeightID)
        m_item->setFirstLineOffset(FLOPRealGlyphHeight);
    else if( radioFlop == PropertyWidget_Flop::FontAscentID)
        m_item->setFirstLineOffset(FLOPFontAscent);
    else if( radioFlop == PropertyWidget_Flop::LineSpacingID)
        m_item->setFirstLineOffset(FLOPLineSpacing);
-----
that's it. fixed.

I'd also like comments on whether a switch/case statement would be more suitable for the last block?
TagsNo tags attached.
Patch

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2011-08-08 11:32 mike_p New Issue
2011-08-08 11:53 jghali Status new => resolved
2011-08-08 11:53 jghali Fixed in Version => 1.5.0svn
2011-08-08 11:53 jghali Resolution open => fixed
2011-08-08 11:53 jghali Assigned To => jghali
2011-09-15 19:35 cbradney Status resolved => closed
2015-09-17 20:08 Kunda Category Story Editor / Text Frames => Story Ed/Txt Frames
2015-09-17 20:12 Kunda Category Story Ed/Txt Frames => Story Editor / Text Frames