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);
|
||||
{
|
||||
// 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);
|
||||
dispatch(cmd, dr);
|
||||
// redraw the screen at the end (first of the two drawing steps).
|
||||
// This is done unless explicitly requested otherwise.
|
||||
// This code is kept inside the undo group because updateBuffer
|
||||
// can create undo actions (see #11292)
|
||||
if (dr.screenUpdate() & Update::ForceAll) {
|
||||
for (Buffer const * b : theBufferList())
|
||||
b->changed(true);
|
||||
dr.screenUpdate(dr.screenUpdate() & ~Update::ForceAll);
|
||||
}
|
||||
|
||||
updateCurrentView(cmd, dr);
|
||||
}
|
||||
|
||||
|
@ -4550,7 +4550,7 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
lyxrc.currentZoom, lyxrc.defaultZoom));
|
||||
|
||||
guiApp->fontLoader().update();
|
||||
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||
dr.screenUpdate(Update::ForceAll | Update::FitCursor);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,9 @@ namespace Update {
|
||||
SinglePar = 8,
|
||||
/// Only the inset decorations need to be redrawn, no text metrics
|
||||
/// 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)
|
||||
|
Loading…
Reference in New Issue
Block a user