From e1cb15ee5d9377cef6e3683a6d0bb68eb9b379c1 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 1 Jun 2024 09:06:44 +0200 Subject: [PATCH] Reset require_fresh_start_ after buffer has been viewed/exported The LFUN buffer-reset-export states to start afresh the export for the next run, but in fact, the boolean was never reset, so that this was done for all subsequent runs unless the buffer had been closed and reopened. Now the lfun does what it states and only acts on the next pass. --- src/frontends/qt/GuiView.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index b4c412be6d..f8be587106 100644 --- a/src/frontends/qt/GuiView.cpp +++ b/src/frontends/qt/GuiView.cpp @@ -4492,6 +4492,10 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr) &GuiViewPrivate::compileAndDestroy, &Buffer::doExport, nullptr, cmd.allowAsync(), true); + // If fresh start had been required, reset to false here + // otherwise this would be done on each subsequent call + if (doc_buffer) + doc_buffer->requireFreshStart(false); break; } case LFUN_BUFFER_VIEW: { @@ -4501,6 +4505,10 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr) &GuiViewPrivate::previewAndDestroy, nullptr, &Buffer::preview, cmd.allowAsync()); + // If fresh start had been required, reset to false here + // otherwise this would be done on each subsequent call + if (doc_buffer) + doc_buffer->requireFreshStart(false); break; } case LFUN_MASTER_BUFFER_UPDATE: { @@ -4510,6 +4518,10 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr) &GuiViewPrivate::compileAndDestroy, &Buffer::doExport, nullptr, cmd.allowAsync(), true); + // If fresh start had been required, reset to false here + // otherwise this would be done on each subsequent call + if (doc_buffer && doc_buffer->masterBuffer()) + doc_buffer->masterBuffer()->requireFreshStart(false); break; } case LFUN_MASTER_BUFFER_VIEW: { @@ -4518,6 +4530,10 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr) docstring(), &GuiViewPrivate::previewAndDestroy, nullptr, &Buffer::preview, cmd.allowAsync()); + // If fresh start had been required, reset to false here + // otherwise this would be done on each subsequent call + if (doc_buffer && doc_buffer->masterBuffer()) + doc_buffer->masterBuffer()->requireFreshStart(false); break; } case LFUN_EXPORT_CANCEL: {