View Issue Details

IDProjectCategoryView StatusLast Update
0002770ScribusScripterpublic2006-01-10 14:04
Reporterrdebel Assigned Tosubik  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
PlatformLaptop 1.4 GhZ CentrinoOSDebian unstable/testingOS Version1.3cvs
Product Version1.3.2cvs 
Fixed in Version1.3.2cvs 
Summary0002770: setStyle (Scripter) applies only to first selected frame
DescriptionWhen selecting many frames setStyle applies the style only to the first selected frame.
Example:
1:ob=createText(x,y,w,h,str(1))
2:setText("abc",ob)
3:ob=createText(x,y,w,h,str(2))
4:setText("def",ob)
5:for i in range(1):
6: selectObject(str(i+1))
7:setStyle("Style1")
If you omit line 7, all (two) objects are selected
after line 7 the style is only applied to frame "1"
TagsNo tags attached.
Patch

Relationships

related to 0002758 closedsubik Setting different paragraph-style in one textframe from scripter doesn't work 
child of 0003813 acknowledged Metabug: Scripter 

Activities

subik

2005-10-30 11:51

manager   ~0007263

should be fixed in current devel 1.3cvs tree. Please recheck after public CVS synchronization.

rdebel

2005-11-01 06:11

reporter   ~0007296

Works better ;-) now (31.10.05) . Applies the style to all selected Frames without the last one (if the are spread over the hole document)
And applying style in the following way like before doesn't work anymore:
ob=createText(x,y,w,t)
setStyle("blahbla", ob)

you have to do it in the following way:
deselectAll()
ob=createText(x,y,w,t,"frame1")
selectObjects("frame1")
setStyle("blahbla")

Some more lines, but you have the advantage to apply one style to many frames.
I'd expect to work setStyle like the following: (see Bug 1606 and discussion there)
If there are paragraphs selected within frame:
   setStyle("blah") applies on paragraph,
   setStyle("bla",ob) applies on special object
if there are textframes selected:
   setStyle("blah") applies on all selected frames
   setStyle("blah",ob) applies on special object
if there is nothing selected
   setStyle("blah") -> error or applies last frame
   setStyle("blah",ob) applies on special object
You should (as it is now) have the possibility to selectObjects over the hole document.

subik

2005-11-01 19:41

manager   ~0007298

I've changed this procedure a bit. Now it behaves:


# selected another frame before. Only "o" frame is set. It's correct.
o = createText(10, 10, 100, 100)
insertText('Lorem Ipsum...', 0, o)
setStyle('sty', o)

# create new frame, another is selected before. New one is not selected.
# only previous selection has style set. Correct.
o = createText(10, 10, 100, 100)
insertText('Lorem Ipsum...', 0, o)
setStyle('sty')

# previously selected object + new explicitly selected. It sets both objects.
# Correct.
o = createText(10, 10, 100, 100)
insertText('Lorem Ipsum...', 0, o)
selectObject(o)
setStyle('sty')

# select various textframes in varous pages. Woks fine here. All frames are stylled.
deselectAll()
selectObject('Text2')
selectObject('Text1')
selectObject('Text7')
setStyle('sty')

Issue History

Date Modified Username Field Change
2005-10-28 06:10 rdebel New Issue
2005-10-28 07:04 ringerc Relationship added related to 0002758
2005-10-30 11:48 subik Status new => assigned
2005-10-30 11:48 subik Assigned To => subik
2005-10-30 11:51 subik Note Added: 0007263
2005-11-01 06:11 rdebel Note Added: 0007296
2005-11-01 19:41 subik Note Added: 0007298
2005-12-25 11:03 subik Status assigned => resolved
2005-12-25 11:03 subik Fixed in Version => 1.3.3cvs
2005-12-25 11:03 subik Resolution open => fixed
2005-12-26 19:18 plinnell Fixed in Version 1.3.3cvs => 1.3.2cvs
2006-01-10 14:04 cbradney Status resolved => closed
2006-05-13 21:18 christoph_s Relationship added child of 0003813