mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-14 01:22:33 +00:00
BufferView: Be on the safe side: clear out all of text_metrics_ when doing a full update.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@20220 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
bd5fd1bc17
commit
b01b6a3023
@ -1097,9 +1097,6 @@ void BufferView::workAreaResize(int width, int height)
|
||||
width_ = width;
|
||||
height_ = height;
|
||||
|
||||
// The complete text metrics will be redone.
|
||||
text_metrics_.clear();
|
||||
|
||||
if (buffer_)
|
||||
resize();
|
||||
}
|
||||
@ -1464,7 +1461,6 @@ ViewMetricsInfo const & BufferView::viewMetricsInfo()
|
||||
void BufferView::updateMetrics(bool singlepar)
|
||||
{
|
||||
Text & buftext = buffer_->text();
|
||||
TextMetrics & tm = textMetrics(&buftext);
|
||||
pit_type size = int(buftext.paragraphs().size());
|
||||
|
||||
if (anchor_ref_ > int(buftext.paragraphs().size() - 1)) {
|
||||
@ -1478,9 +1474,12 @@ void BufferView::updateMetrics(bool singlepar)
|
||||
|
||||
// Clear out paragraph metrics to avoid having invalid metrics
|
||||
// in the cache from paragraphs not relayouted below
|
||||
tm.clear();
|
||||
// The complete text metrics will be redone.
|
||||
text_metrics_.clear();
|
||||
}
|
||||
|
||||
TextMetrics & tm = textMetrics(&buftext);
|
||||
|
||||
// If the paragraph metrics has changed, we can not
|
||||
// use the singlepar optimisation.
|
||||
if (singlepar
|
||||
|
Loading…
Reference in New Issue
Block a user