commit 70a71a824be37f1e03d0c21c3796a223d227f7db
Author: Scott Kostyshak <skost...@lyx.org>
Date:   Tue Nov 22 14:24:11 2022 -0500

    After confirm cancel, hide busy and cancel buttons
---
 src/frontends/qt/GuiView.cpp |    9 ++++++++-
 src/frontends/qt/GuiView.h   |    2 ++
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 2ec5037..82a6f17 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -663,6 +663,9 @@ GuiView::GuiView(int id)
                processStop, SLOT(hide()));
        connect(processStop, SIGNAL(pressed()), this, 
SLOT(checkCancelBackground()));
 
+       connect(this, SIGNAL(scriptKilled()), busySVG, SLOT(hide()));
+       connect(this, SIGNAL(scriptKilled()), processStop, SLOT(hide()));
+
        stat_counts_ = new GuiClickableLabel(statusBar());
        stat_counts_->setAlignment(Qt::AlignCenter);
        stat_counts_->setFrameStyle(QFrame::StyledPanel);
@@ -831,8 +834,12 @@ void GuiView::checkCancelBackground()
        int const ret =
                Alert::prompt(ttl, msg, 1, 1,
                        _("&Cancel export"), _("Co&ntinue"));
-       if (ret == 0)
+       if (ret == 0) {
                Systemcall::killscript();
+               // stop busy signal immediately so that in the subsequent
+               // "Export canceled" prompt the status bar icons are accurate.
+               Q_EMIT scriptKilled();
+       }
 }
 
 void GuiView::statsPressed()
diff --git a/src/frontends/qt/GuiView.h b/src/frontends/qt/GuiView.h
index cbe805e..5b22ea5 100644
--- a/src/frontends/qt/GuiView.h
+++ b/src/frontends/qt/GuiView.h
@@ -228,6 +228,8 @@ Q_SIGNALS:
        void bufferViewChanged();
        /// emitted when zoom is modified
        void currentZoomChanged(int);
+       /// emitted when script is killed (e.g., user cancels export)
+       void scriptKilled();
 
 public Q_SLOTS:
        ///
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to