mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-31 15:46:16 +00:00
Redraw all work areas while zooming (#12334)
This commit is contained in:
parent
4c0caf9dd4
commit
f3d5a95bb2
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user