commit b408222f76738678584a23c5327214c0bb1b05f2
Author: Juergen Spitzmueller <[email protected]>
Date: Sun Feb 11 09:50:38 2018 +0100
Disable BUFFER_EXPORT and BUFFER_EXPORT_AS while buffer is processed
I am rather irritated we didn't do this already, since synchronous runs
with BUFFER_VIEW or BUFFER_UPDATE leads to all sorts of problems,
including crashes.
Fixes the crash in #8338 (but not the bug itself).
(cherry picked from commit 1437ae3f9cf78ffd5c639cb4e70a0b1fba9f600e)
---
src/frontends/qt4/GuiView.cpp | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index c587460..e511cd6 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -1913,8 +1913,22 @@ bool GuiView::getStatus(FuncRequest const & cmd,
FuncStatus & flag)
enable = doc_buffer &&
doc_buffer->notifiesExternalModification();
break;
- case LFUN_BUFFER_WRITE_AS:
+ case LFUN_BUFFER_EXPORT: {
+ if (!doc_buffer || d.processing_thread_watcher_.isRunning()) {
+ enable = false;
+ break;
+ }
+ return doc_buffer->getStatus(cmd, flag);
+ break;
+ }
+
case LFUN_BUFFER_EXPORT_AS:
+ if (!doc_buffer || d.processing_thread_watcher_.isRunning()) {
+ enable = false;
+ break;
+ }
+ // fall through
+ case LFUN_BUFFER_WRITE_AS:
enable = doc_buffer != 0;
break;