Redraw all work areas while zooming (#12334)

This commit is contained in:
Juergen Spitzmueller 2021-10-31 13:43:27 +01:00
parent 4c0caf9dd4
commit f3d5a95bb2
2 changed files with 17 additions and 3 deletions

View File

@ -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;

View File

@ -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