commit 103bf05099652510ea0eaa5e45256acd32cba476
Author: Richard Heck <[email protected]>
Date:   Sun Jul 10 01:43:19 2016 -0400

    Simplify logic a bit. (This was meant to be part of a previous
    commit.)
    
    (cherry picked from commit 2104d41f71ff39f5c3f9f5a485707633b1bfb25b)
---
 src/Buffer.cpp |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 22c993c..c20ce12 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -4318,12 +4318,11 @@ Buffer::ExportStatus Buffer::preview(string const & 
format, bool includeall) con
 
        if (status != ExportSuccess)
                return status;
-       if (previewFile.exists()) {
-               if (!formats.view(*this, previewFile, format))
-                       return PreviewError;
-               else
-                       return PreviewSuccess;
-       } 
+
+       if (previewFile.exists())
+               return formats.view(*this, previewFile, format) ?
+                       PreviewSuccess : PreviewError;
+
        // Successful export but no output file?
        // Probably a bug in error detection.
        LATTEST(status != ExportSuccess);

Reply via email to