mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Change a brain-dead algorithm to a smarter one.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7369 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
fcb82ea793
commit
b52b324d64
@ -1,3 +1,9 @@
|
|||||||
|
2003-07-26 Asger Alstrup <alstrup@local>
|
||||||
|
|
||||||
|
* rowpainter.C (paintRows): Change algorithm to work directly on
|
||||||
|
the insets rather than asking every character in the document
|
||||||
|
whether its an inset.
|
||||||
|
|
||||||
2003-07.26 Alfredo Braunstein <abraunst@libero.it>
|
2003-07.26 Alfredo Braunstein <abraunst@libero.it>
|
||||||
|
|
||||||
* buffer.C (openFileWrite): factorize some code
|
* buffer.C (openFileWrite): factorize some code
|
||||||
|
@ -1083,13 +1083,14 @@ void paintRows(BufferView const & bv, LyXText const & text,
|
|||||||
|
|
||||||
// compute inset metrics
|
// compute inset metrics
|
||||||
for (; pit != end; ++pit) {
|
for (; pit != end; ++pit) {
|
||||||
for (int pos = 0; pos != pit->size(); ++pos) {
|
InsetList & insetList = pit->insetlist;
|
||||||
if (pit->isInset(pos)) {
|
InsetList::iterator ii = insetList.begin();
|
||||||
|
InsetList::iterator iend = insetList.end();
|
||||||
|
for (; ii != iend; ++ii) {
|
||||||
Dimension dim;
|
Dimension dim;
|
||||||
LyXFont font;
|
LyXFont font;
|
||||||
MetricsInfo mi(perv(bv), font, text.workWidth());
|
MetricsInfo mi(perv(bv), font, text.workWidth());
|
||||||
pit->getInset(pos)->metrics(mi, dim);
|
ii->inset->metrics(mi, dim);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user