texture icon indicating copy to clipboard operation
texture copied to clipboard

"replace figures" keep the image

Open jcolomb opened this issue 6 years ago • 1 comments

Describe the bug

when replacing a figure, the new figure is included in the dar file and the xml link to that file, but the old file is not erased from the dar file (so the file gets bigger for no reason !)

Steps To Reproduce

add a figure, replace it, look into the unzipped dar file.

Expected behavior

Figures not linked in the xml should be erased

Screenshots

If applicable, add screenshots to help explain your problem.

NB: same problem if one erase the figure completely .

jcolomb avatar Jun 04 '19 21:06 jcolomb

Hi @jcolomb! We are aware of this, and we still have not decided how to handle this situation. At the first glance it may seem that the assets could be deleted from the DAR file when removed. However, this would break undo/redo.

We have several options how to deal with this:

  1. Purge on every save (then we would need to clear the undo/redo history)
  2. Purge option in a separate file manager view. Like you see the images/files in general that are not referenced in the document with the option to purge them in a controlled manner.

Which approach would you favour?

michael avatar Jun 05 '19 07:06 michael