]> git.lyx.org Git - features.git/commitdiff
Fix instant preview for documents not specifying a specific output format.
authorEnrico Forestieri <forenr@lyx.org>
Mon, 27 Apr 2015 10:27:42 +0000 (12:27 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 27 Apr 2015 10:30:03 +0000 (12:30 +0200)
Fixes the regression introduced at 0bb378ba.

src/graphics/PreviewLoader.cpp

index 3fd8fef029be82a3b53f679bca1b8779596f4750..6dfec9b438745e2fc98ee9b4a8cac23c88afa49e 100644 (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;