View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009019 | Scribus | Scripter | public | 2010-04-14 20:22 | 2010-06-24 21:09 |
Reporter | danielb | Assigned To | jghali | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | PC | OS | OpenSuse | OS Version | 11.2 |
Product Version | 1.3.6 | ||||
Fixed in Version | 1.3.7svn | ||||
Summary | 0009019: unGroupObject(...) won't work in scripter | ||||
Description | UnGroupObject(...) does not work. If you pass a name of a group this group won't be ungrouped. | ||||
Steps To Reproduce | for i in range(1, 5) : #continue scribus.gotoPage(i) # scribus.messageBox('Message:', str(i)) (iT, iI, iO , iB) = scribus.getPageMargins() iItem = scribus.getPageItems() n=0 while n<len(iItem): scribus.messageBox('Message:', 'Pageitems:'+str(iItem)) jItem=iItem[n] jFrame = jItem[0] if jItem[1]==6: scribus.messageBox('Message:', 'i:'+str(i)+'\njFrame6:'+str(jFrame) + str(jItem)) scribus.unGroupObject(jFrame) continue scribus.messageBox('Message:', 'i:'+str(i)+'\njFrame:'+str(jFrame) + str(jItem)) # the item must be at the same height as the original have the same width # and have a distance from the left margin equal to the difference # between left and right margin if i %2 == 0: scribus.moveObject(dX, 0, jFrame) else: scribus.moveObject(-dX, 0, jFrame) n+=1 if jItem[1] is 6 (group), than this group should be removed and number of items in iItem should be decreased by one! | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
Sry, but seems only partly fixed. My script exits with that error on the second run of the while loop. Traceback (most recent call last): File "<string>", line 8, in <module> File "...script.py", line 68, in <module> scribus.unGroupObject(jFrame) NoValidObjectError: Object not found although the Message: Pageitems:[('Gruppe18', 6, 61), ('Text67', 4, 62), ('Bild68', 2, 63), ('Text71', 4, 64)] confirms, that the group is stil there. Should end up in an endless loop as before. However, the objects are ungrouped after the script ran till the end. |
|
Sorry but : 1) the indentation of pasted code is broken. I had to modify it to make it work correctly. 2) n must be incremented after ungrouping : iItem length won't change miraculously after ungrouping, after getPageItems() call scribus has no control anymore on iItem, that control is transferred to python |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-04-14 20:22 | danielb | New Issue | |
2010-04-14 22:27 | jghali | Summary | UnGroupObject(...) won't work => unGroupObject(...) won't work in scripter |
2010-04-14 22:27 | jghali | Steps to Reproduce Updated | |
2010-04-14 22:28 | jghali | Status | new => resolved |
2010-04-14 22:28 | jghali | Fixed in Version | => 1.3.7svn |
2010-04-14 22:28 | jghali | Resolution | open => fixed |
2010-04-14 22:28 | jghali | Assigned To | => jghali |
2010-04-15 14:47 | danielb | Note Added: 0023700 | |
2010-04-15 14:47 | danielb | Status | resolved => feedback |
2010-04-15 14:47 | danielb | Resolution | fixed => reopened |
2010-04-15 15:31 | jghali | Note Added: 0023701 | |
2010-04-15 15:31 | jghali | Status | feedback => resolved |
2010-04-15 15:31 | jghali | Resolution | reopened => fixed |
2010-06-24 21:09 | cbradney | Status | resolved => closed |