Fix instant preview for documents not specifying a specific output format.

Fixes the regression introduced at 0bb378ba.
This commit is contained in:
Enrico Forestieri 2015-04-27 12:27:42 +02:00
parent f46d08aafd
commit b82e0d6d7f

View File

@ -587,7 +587,13 @@ void PreviewLoader::Impl::startLoading(bool wait)
LYXERR(Debug::LATEX, "Format = " << buffer_.params().getDefaultOutputFormat());
string latexparam = "";
OutputParams::FLAVOR flavor = buffer_.params().getOutputFlavor();
bool docformat = !buffer_.params().default_output_format.empty()
&& buffer_.params().default_output_format != "default";
// Use LATEX flavor if the document does not specify a specific
// output format (see bug 9371).
OutputParams::FLAVOR flavor = docformat
? buffer_.params().getOutputFlavor()
: OutputParams::LATEX;
if (buffer_.params().encoding().package() == Encoding::japanese) {
latexparam = " --latex=platex";
flavor = OutputParams::LATEX;