commit f3d5a95bb2472c907bb9bb7d07dc622413e3accb
Author: Juergen Spitzmueller <[email protected]>
Date:   Sun Oct 31 13:43:27 2021 +0100

    Redraw all work areas while zooming (#12334)
---
 src/frontends/qt/GuiView.cpp |   17 ++++++++++++++---
 src/frontends/qt/GuiView.h   |    3 +++
 2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 9aa325f..1068bdd 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -786,7 +786,7 @@ void GuiView::zoomSliderMoved(int value)
 {
        DispatchResult dr;
        dispatch(FuncRequest(LFUN_BUFFER_ZOOM, convert<string>(value)), dr);
-       currentWorkArea()->scheduleRedraw(true);
+       scheduleRedrawWorkAreas();
        zoom_value_->setText(toqstr(bformat(_("[[ZOOM]]%1$d%"), value)));
 }
 
@@ -802,7 +802,7 @@ void GuiView::zoomInPressed()
 {
        DispatchResult dr;
        dispatch(FuncRequest(LFUN_BUFFER_ZOOM_IN), dr);
-       currentWorkArea()->scheduleRedraw(true);
+       scheduleRedrawWorkAreas();
 }
 
 
@@ -810,7 +810,7 @@ void GuiView::zoomOutPressed()
 {
        DispatchResult dr;
        dispatch(FuncRequest(LFUN_BUFFER_ZOOM_OUT), dr);
-       currentWorkArea()->scheduleRedraw(true);
+       scheduleRedrawWorkAreas();
 }
 
 
@@ -823,6 +823,17 @@ void GuiView::showZoomContextMenu()
 }
 
 
+void GuiView::scheduleRedrawWorkAreas()
+{
+       for (int i = 0; i < d.tabWorkAreaCount(); i++) {
+               TabWorkArea* ta = d.tabWorkArea(i);
+               for (int u = 0; u < ta->count(); u++) {
+                       ta->workArea(u)->scheduleRedraw(true);
+               }
+       }
+}
+
+
 QVector<GuiWorkArea*> GuiView::GuiViewPrivate::guiWorkAreas()
 {
        QVector<GuiWorkArea*> areas;
diff --git a/src/frontends/qt/GuiView.h b/src/frontends/qt/GuiView.h
index 657634c..c16b557 100644
--- a/src/frontends/qt/GuiView.h
+++ b/src/frontends/qt/GuiView.h
@@ -288,6 +288,9 @@ private:
        ///
        TabWorkArea * addTabWorkArea();
 
+       ///
+       void scheduleRedrawWorkAreas();
+
        /// connect to signals in the given BufferView
        void connectBufferView(BufferView & bv);
        /// disconnect from signals in the given BufferView
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to