mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 14:15:32 +00:00
* BufferView::Pimpl::update:
- streamline a bit to only run updateMetrics once - do not take a backup copy of theCoords git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14332 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1ff081141d
commit
32cd0ee6f9
@ -701,33 +701,29 @@ void BufferView::Pimpl::update(Update::flags flags)
|
||||
// Update macro store
|
||||
buffer_->buildMacros();
|
||||
|
||||
CoordCache backup;
|
||||
std::swap(theCoords, backup);
|
||||
|
||||
// This, together with doneUpdating(), verifies (using
|
||||
// asserts) that screen redraw is not called from
|
||||
// within itself.
|
||||
theCoords.startUpdating();
|
||||
|
||||
// First drawing step
|
||||
updateMetrics(flags & Update::SinglePar);
|
||||
bool singlePar = flags & Update::SinglePar;
|
||||
bool forceupdate(flags & (Update::Force | Update::SinglePar));
|
||||
|
||||
if ((flags & Update::FitCursor) && fitCursor()) {
|
||||
if ((flags & (Update::FitCursor | Update::MultiParSel))
|
||||
&& (fitCursor() || multiParSel())) {
|
||||
forceupdate = true;
|
||||
updateMetrics();
|
||||
}
|
||||
if ((flags & Update::MultiParSel) && multiParSel()) {
|
||||
forceupdate = true;
|
||||
updateMetrics();
|
||||
singlePar = false;
|
||||
}
|
||||
|
||||
if (forceupdate) {
|
||||
// Second drawing step
|
||||
updateMetrics(singlePar);
|
||||
owner_->workArea()->redraw(*bv_);
|
||||
} else {
|
||||
// Abort updating of the coord
|
||||
// cache - just restore the old one
|
||||
std::swap(theCoords, backup);
|
||||
theCoords.doneUpdating();
|
||||
}
|
||||
} else
|
||||
owner_->workArea()->greyOut();
|
||||
|
Loading…
Reference in New Issue
Block a user