]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.C
cosmetic fix
[lyx.git] / src / rowpainter.C
index d61471fb2684d30adbb093ad2f942a8b7061bd4a..e4cdfb3e856c6af17a50d1f7687cb843ba41cb86 100644 (file)
@@ -1076,20 +1076,20 @@ void paintRows(BufferView const & bv, LyXText const & text,
        // calling metrics() directly is (a) slow and (b) crashs
        if (&text == bv.text) {
 #if 1
-               lyxerr << "paintRows, global...\n";
                // make sure all insets are updated
                ParagraphList::iterator pit = text.ownerParagraphs().begin();
                ParagraphList::iterator end = text.ownerParagraphs().end();
 
                // compute inset metrics
                for (; pit != end; ++pit) {
-                       for (int pos = 0; pos != pit->size(); ++pos) {
-                               if (pit->isInset(pos)) {
-                                       Dimension dim;
-                                       LyXFont font;
-                                       MetricsInfo mi(perv(bv), font, text.workWidth());
-                                       pit->getInset(pos)->metrics(mi, dim);
-                               }
+                       InsetList & insetList = pit->insetlist;
+                       InsetList::iterator ii = insetList.begin();
+                       InsetList::iterator iend = insetList.end();
+                       for (; ii != iend; ++ii) {
+                               Dimension dim;
+                               LyXFont font;
+                               MetricsInfo mi(perv(bv), font, text.workWidth());
+                               ii->inset->metrics(mi, dim);
                        }
                }
 #else