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.

(cherry picked from commit e1cb15ee5d)
This commit is contained in:
Juergen Spitzmueller 2024-06-01 09:06:44 +02:00 committed by Richard Kimberly Heck
parent 1f6f3b4f0a
commit 91e90a7c1c
2 changed files with 18 additions and 0 deletions

View File

@ -4491,6 +4491,10 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
&GuiViewPrivate::compileAndDestroy, &GuiViewPrivate::compileAndDestroy,
&Buffer::doExport, &Buffer::doExport,
nullptr, cmd.allowAsync(), true); 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; break;
} }
case LFUN_BUFFER_VIEW: { case LFUN_BUFFER_VIEW: {
@ -4500,6 +4504,10 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
&GuiViewPrivate::previewAndDestroy, &GuiViewPrivate::previewAndDestroy,
nullptr, nullptr,
&Buffer::preview, cmd.allowAsync()); &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; break;
} }
case LFUN_MASTER_BUFFER_UPDATE: { case LFUN_MASTER_BUFFER_UPDATE: {
@ -4509,6 +4517,10 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
&GuiViewPrivate::compileAndDestroy, &GuiViewPrivate::compileAndDestroy,
&Buffer::doExport, &Buffer::doExport,
nullptr, cmd.allowAsync(), true); 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; break;
} }
case LFUN_MASTER_BUFFER_VIEW: { case LFUN_MASTER_BUFFER_VIEW: {
@ -4517,6 +4529,10 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
docstring(), docstring(),
&GuiViewPrivate::previewAndDestroy, &GuiViewPrivate::previewAndDestroy,
nullptr, &Buffer::preview, cmd.allowAsync()); 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; break;
} }
case LFUN_EXPORT_CANCEL: { case LFUN_EXPORT_CANCEL: {

View File

@ -65,6 +65,8 @@ What's new
- Update acknowledgments handling in aastex63 layout - Update acknowledgments handling in aastex63 layout
(cf. https://journals.aas.org/aastexguide/#acknowledgments) (cf. https://journals.aas.org/aastexguide/#acknowledgments)
- Make LFUN_RESET_EXPORT work properly.
* USER INTERFACE * USER INTERFACE