mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
Force redraw of all bufferviews after zoom in/out
Add a new ForceAll update flag that forces to update metrics and redraw all buffer views. The situation in multi windows setting is very fragile and will need to be adressed properly in the 2.5 cycle.
This commit is contained in:
parent
8d17594a33
commit
9f899a17fa
@ -1479,13 +1479,16 @@ DispatchResult const & GuiApplication::dispatch(FuncRequest const & cmd)
|
|||||||
|
|
||||||
dr.screenUpdate(Update::FitCursor);
|
dr.screenUpdate(Update::FitCursor);
|
||||||
{
|
{
|
||||||
// This handles undo groups automagically
|
// All the code is kept inside the undo group because
|
||||||
|
// updateBuffer can create undo actions (see #11292)
|
||||||
UndoGroupHelper ugh(buffer);
|
UndoGroupHelper ugh(buffer);
|
||||||
dispatch(cmd, dr);
|
dispatch(cmd, dr);
|
||||||
// redraw the screen at the end (first of the two drawing steps).
|
if (dr.screenUpdate() & Update::ForceAll) {
|
||||||
// This is done unless explicitly requested otherwise.
|
for (Buffer const * b : theBufferList())
|
||||||
// This code is kept inside the undo group because updateBuffer
|
b->changed(true);
|
||||||
// can create undo actions (see #11292)
|
dr.screenUpdate(dr.screenUpdate() & ~Update::ForceAll);
|
||||||
|
}
|
||||||
|
|
||||||
updateCurrentView(cmd, dr);
|
updateCurrentView(cmd, dr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4550,7 +4550,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
lyxrc.currentZoom, lyxrc.defaultZoom));
|
lyxrc.currentZoom, lyxrc.defaultZoom));
|
||||||
|
|
||||||
guiApp->fontLoader().update();
|
guiApp->fontLoader().update();
|
||||||
dr.screenUpdate(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::ForceAll | Update::FitCursor);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,9 @@ namespace Update {
|
|||||||
SinglePar = 8,
|
SinglePar = 8,
|
||||||
/// Only the inset decorations need to be redrawn, no text metrics
|
/// Only the inset decorations need to be redrawn, no text metrics
|
||||||
/// update is needed.
|
/// update is needed.
|
||||||
Decoration = 16
|
Decoration = 16,
|
||||||
|
/// Force metrics and redraw for all buffers.
|
||||||
|
ForceAll = 32
|
||||||
};
|
};
|
||||||
|
|
||||||
inline flags operator|(flags const f, flags const g)
|
inline flags operator|(flags const f, flags const g)
|
||||||
|
Loading…
Reference in New Issue
Block a user