if (buffer_) {
cursor_.clearSelection();
xsel_cache_.set = false;
+ // The buffer did not really change, but this causes the
+ // redraw we need because we cleared the selection above.
+ buffer_->changed();
}
}
}
+// FIXME: We should split-up updateMetrics() for the singlepar case.
void BufferView::updateMetrics(bool singlepar)
{
LyXText & buftext = buffer_->text();
anchor_ref_ = int(buftext.paragraphs().size() - 1);
offset_ref_ = 0;
}
+
+ // If the paragraph metrics has changed, we can not
+ // use the singlepar optimisation.
+ if (singlepar && tm.redoParagraph(cursor_.bottom().pit()))
+ singlepar = false;
pit_type const pit = anchor_ref_;
int pit1 = pit;
// (if this paragraph contains insets etc., rebreaking will
// recursively descend)
if (!singlepar || pit == cursor_.bottom().pit())
+ // If the paragraph metrics has changed, we can not
+ // use the singlepar optimisation.
if (tm.redoParagraph(pit))
singlepar = false;