commit 91e90a7c1cec7c2b5c52e41d5ed9ee87d5142b05
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Sat Jun 1 09:06:44 2024 +0200

    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 e1cb15ee5d9377cef6e3683a6d0bb68eb9b379c1)
---
 src/frontends/qt/GuiView.cpp | 16 ++++++++++++++++
 status.24x                   |  2 ++
 2 files changed, 18 insertions(+)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index c44fbb3ed1..a20edd1cfe 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -4491,6 +4491,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: {
@@ -4500,6 +4504,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: {
@@ -4509,6 +4517,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: {
@@ -4517,6 +4529,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: {
diff --git a/status.24x b/status.24x
index b3831b31c6..0328af480b 100644
--- a/status.24x
+++ b/status.24x
@@ -65,6 +65,8 @@ What's new
 - Update acknowledgments handling in aastex63 layout 
   (cf. https://journals.aas.org/aastexguide/#acknowledgments)
 
+- Make LFUN_RESET_EXPORT work properly.
+
 
 * USER INTERFACE
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to