On 08/05/2013 05:45 PM, Vincent van Ravesteijn wrote:


Op 5 aug. 2013 23:25 schreef "Richard Heck" <rgh...@lyx.org <mailto:rgh...@lyx.org>> het volgende:
>
> On 08/04/2013 05:43 PM, Richard Heck wrote:
>>
>>
>> The attached patch explains the problem and offers a simple solution. This is master-only, and it needs to go into 2.1. OK?
>
>
> Someone want to approve this? or not?
>
>> Richard
>>
>

First, please shorten the subject line to around 60 chars.


Do you mean the email subject? Or...?

Second, it is ugly that PreviewImage depends on Buffer.

Third, it doesn't feel good to leave behind preview images, just in case the export XHTML needs them.

Fourth, I don't like removing files in a destructor in the first place. It should be a conscious decision to do that. Compare also hideDialogs calls in Inset destructors. If you would need to delete the files explicitly, it would also be easier to not delete them when appropriate.

Fifth, do you use isClone to detect whether we are exporting ? Seems like a hack that deserves a comment.


I agree with all of this. But this patch more or less restores the behavior from before Abdel broke it (while fixing a lot else). If I were doing this now, I'd do it differently. And I will do it differently. I think we should copy the preview images during the XHTML export process, and then leave those lying around (in the temporary directory, of course, so they will eventually get deleted). But it does not seem a good idea to do that now. Still, if you like, I can prepare a patch for that behavior, and you can decide whether to do it now or wait until after 2.1.0.

Richard

Reply via email to