diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp index 9aa325f483..1068bdd556 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(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 GuiView::GuiViewPrivate::guiWorkAreas() { QVector areas; diff --git a/src/frontends/qt/GuiView.h b/src/frontends/qt/GuiView.h index 657634c9fe..c16b5570e3 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