mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Fixup 'Avoid metrics computation on resize when width did not change'
When the width of the window did not change, computing full metrics is not necessary in BufferView::resize(), but it is better to redraw the screen (especially with Wayland). Typical use cases are when using M-x to open the minibuffer or going in and out of an equation (which shows/hides the math toolbars).
This commit is contained in:
parent
c3fb9fe95f
commit
83e7c74f6b
@ -2529,8 +2529,11 @@ void BufferView::resize(int width, int height)
|
||||
// Clear the paragraph height cache.
|
||||
d->par_height_.clear();
|
||||
// Redo the metrics.
|
||||
updateMetrics();
|
||||
updateMetrics(true);
|
||||
}
|
||||
// metrics is OK, full drawing is necessary now
|
||||
d->update_flags_ = (d->update_flags_ & ~Update::Force) | Update::ForceDraw;
|
||||
d->update_strategy_ = FullScreenUpdate;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user