save as copy removes objects for eps/pdf if limited to object with ID
Split from inbox#2205
Steps to reproduce:
- open Inkscape
- create a few objects or open this file basicdoc.svg
- if creating a file, set the id of one of them to text50 (or just remember it)
- Save as a copy (choose pdf)
- Limit export to the object with ID: text50 (optionally, text output options: Convert text to paths)
- OK
What happened?
- Only object with ID is kept, rest are deleted
- if you converted text to paths, text will always remain text (even if save/save as is used). This is good (maybe a bit unexpected for save/save as but I prefer to keep this behaviour)
What should have happened?
- no object should be removed from current document
Version Info:
but not replicated Inkscape 0.92.5 (6c0c36ef, 2020-05-15) or Inkscape 1.0beta2 (2b71d25d, 2019-12-03) Linux Mint 20
Bisection points to
commit a894f2df51fed6e6effa8f2661e4fcf35edba8b7
Author: Patrick Storz <eduard.braun2@gmx.de>
Date: Sat Apr 4 19:27:05 2020 +0200
Fix scaling error when using --export-id for PDF/EPS/PS export
Previous code only rendered the specified item, which could miss
parent transforms and result in incorrect output.
Fix this by always rendering the whole document and removing
other objects with SPObject::cropToObject instead.
Fixes https://gitlab.com/inkscape/inkscape/-/issues/613