Jean-Marc Lasgouttes wrote:

>>>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
> 
> Angus> They do (should) and we do.
> [...]
> Angus> Does that answer you questions?
> 
> Yes, I thought about it after sending the mail.
> 
> And does the order in which we enable the native xforms loaders
> matter?
> 
> JMarc

from PreviewLoader.C:

Converter const * setConverter()
{
        string const from = "lyxpreview";

        Formats::FormatList::const_iterator it  = formats.begin();
        Formats::FormatList::const_iterator end = formats.end();

        for (; it != end; ++it) {
                string const to = it->name();
                if (from == to)
                        continue;

                Converter const * ptr = converters.getConverter(from, to);
                if (ptr)
                        return ptr;
        }
...

Lyx is finding the first converter from lyxpreview to a known format instead
of the shortest conversion from lyxpreview to a loadable format. 

So if you have both converters (lyxpreview->{png,ppm} defined (as I had in
my case) lyx will choose the first one, even if that is costier (because
then the loader will have to make the png->ppm conversion).

Not that it matters so much, but one could define a
Converters::getConverterToDisplayable(Format & from) to correct this case
and simplify things a bit?

Regards, Alfredo


Reply via email to