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.
This commit is contained in:
Juergen Spitzmueller 2024-06-01 09:06:44 +02:00
parent f248b003a9
commit e1cb15ee5d

View File

@ -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: {