Scribus Forums

Scribus => Scripts and Plugins => Topic started by: digirew on September 16, 2020, 07:59:33 PM

Title: API - select all and copy all objects
Post by: digirew on September 16, 2020, 07:59:33 PM
Is it possible to select all objects on a page and copy/paste them into another document? (in a script and not in the program interface itself).

I can see that the copy/paste functions are present, but it seems like I can only do one object at a time?



Title: Re: API - select all and copy all objects
Post by: a.l.e on September 16, 2020, 09:56:37 PM
indeed it can only copy one item at a time.

i've opened a ticket to ask for the reason.

without thinking too much i see two workarounds:

- copying one item at a time should be doable. if you turn out the screen refreshing it should not even be really much slower.
- you can group the items in the selection, copy them and then ungroup them again (if you have many items to copy, i would probably group them any way)

i would expect that future versions of scribus will be able to copy multiple items from a script, but the workarounds should be good enough to get your script to work : - )

ciao
a.l.e
Title: Re: API - select all and copy all objects
Post by: digirew on September 17, 2020, 06:23:21 PM
thanks a.l.e,

the second approach what you mentioned is what I have been doing, but was hoping for a more elegant way. Will need to do more testing but it does seem to do the job so far!