View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0010769 | Scribus | Scripter | public | 2012-06-20 13:36 | 2012-06-20 13:36 |
Reporter | Astroman Pete | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Windows | OS | Windows 7 Professional | OS Version | Service Pack 1 |
Product Version | 1.4.1 | ||||
Summary | 0010769: Master page not refreshed after being edited in script | ||||
Description | I'm working on a set of scripts to layout construction drawings for architecture & engineering in Scribus. Right now, I am working on title block functionality. Information is either set page-by-page, or applies to the whole set. Information that applies to the whole set is put on the Master page. I've gotten everything to work, except text frames that I create on the Master don't show up until the document is closed and reopened, or the Master page is edited by the user. The normal Scripter redraw toggling seems to not help. Also, I've noticed that Scribus crashes sometimes when leaving the master page under these conditions. I'm unfamiliar with producing crash reports, I will gladly oblige if someone points me to a how-to on this. I'm developing at work in Windows, I'm running Kubuntu 12.04 at home (w/ Scribus 1.4.0) and I got the same result there. | ||||
Steps To Reproduce | 1. Save the attached "master_test.py" to a convenient place. 1. Open a new document in Scribus with the default single page template. 2. From the pull-down menus: "Script > Execute Script..." 3. In the "Run Script" dialog: Browse to "master_test.py" and press "OK" 4. Script will create two text frames, one on the current page that says "Hello from the Normal Page!", and one on the master page that says "Hello from the Master Page!". The latter text frame doesn't appear after running the script, until the document is saved and re-opened, or the master page is opened for editing. * Sometimes when leaving the master page editing under these conditions, Scribus crashes. | ||||
Tags | No tags attached. | ||||
Patch | |||||
|
master_test.py (1,113 bytes)
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys try: import scribus except ImportError,err: print "This script must be run within Scribus." sys.exit(1) def main(argv): """ Test function: Master pages not redrawn after the following changes. """ w, h = scribus.getPageSize() scribus.createText(0.0,h/2.0,w,h/2.0,'test_frame') scribus.setText('Hello from the Normal Page!','test_frame') try: scribus.editMasterPage(scribus.masterPageNames()[0]) scribus.createText(0.0,0.0,w,h,'test_frame2') scribus.setText('Hello from the Master Page!','test_frame2') finally: scribus.closeMasterPage() def main_wrapper(argv): """ Boiler plate from /share/samples/boilerplate.py """ try: scribus.statusMessage("Running script...") scribus.progressReset() main(argv) finally: if scribus.haveDoc(): scribus.setRedraw(True) scribus.statusMessage("") scribus.progressReset() if __name__ == '__main__': main_wrapper(sys.argv) |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-06-20 13:36 | Astroman Pete | New Issue | |
2012-06-20 13:36 | Astroman Pete | File Added: master_test.py |