From 0fc50a26371b9cbaf2cd73c5e377c86bf7fdb215 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Sat, 21 Apr 2018 19:48:59 -0400 Subject: [PATCH] Fix problem with synchronous export. It surprises me a bit that the code is different in this case from the case when EXPORT_in_THREAD is not set. I should check to see if there's a problem in the other case, too. --- src/frontends/qt4/GuiView.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 48908d59a9..c1e28869b8 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -3632,12 +3632,9 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing( // We are asynchronous, so we don't know here anything about the success return true; } else { -#endif - // this will be run unconditionally in case EXPORT_in_THREAD - // is not defined. Buffer::ExportStatus status; if (syncFunc) { - status = (used_buffer->*syncFunc)(format, true); + status = (used_buffer->*syncFunc)(format, false); } else if (previewFunc) { status = (used_buffer->*previewFunc)(format); } else @@ -3646,9 +3643,19 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing( (void) asyncFunc; return (status == Buffer::ExportSuccess || status == Buffer::PreviewSuccess); -#if EXPORT_in_THREAD - // the end of the else clause in that case. } +#else + Buffer::ExportStatus status; + if (syncFunc) { + status = (used_buffer->*syncFunc)(format, true); + } else if (previewFunc) { + status = (used_buffer->*previewFunc)(format); + } else + return false; + handleExportStatus(gv_, status, format); + (void) asyncFunc; + return (status == Buffer::ExportSuccess + || status == Buffer::PreviewSuccess); #endif }