]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.C
Scons: handle the case when qt4 is in system directories
[lyx.git] / src / rowpainter.C
index 4290ffbf840d20425a5c00509a5b5198223314c7..eee68028b4ce91f319bcb59f0f9f0b9cbf648f14 100644 (file)
@@ -893,6 +893,9 @@ void paintPar
                bool cursor_on_row = CursorOnRow(pi, pit, rit, text);
                bool in_inset_alone_on_row = innerCursorOnRow(pi, pit, rit,
                        text);
+               bool leftEdgeFixed = 
+                       (par.getAlign() == LYX_ALIGN_LEFT ||
+                        par.getAlign() == LYX_ALIGN_BLOCK);
 
                // If this is the only object on the row, we can make it wide
                //
@@ -905,7 +908,7 @@ void paintPar
                        if (in) {
                                InsetText * t = const_cast<InsetText *>(in->asTextInset());
                                if (t)
-                                       t->setWide(in_inset_alone_on_row);
+                                       t->setWide(in_inset_alone_on_row && leftEdgeFixed);
                        }
                }
 
@@ -924,7 +927,8 @@ void paintPar
                        // Clear background of this row
                        // (if paragraph background was not cleared)
                        if (!repaintAll &&
-                           (!in_inset_alone_on_row || row_has_changed)) {
+                           (!(in_inset_alone_on_row && leftEdgeFixed) 
+                               || row_has_changed)) {
                                pi.pain.fillRectangle(x, y - rit->ascent(),
                                    text.maxwidth_, rit->height(),
                                    text.backgroundColor());
@@ -949,7 +953,7 @@ void paintPar
                        rp.paintChangeBar();
                        if (rit == rb)
                                rp.paintFirst();
-                       rp.paintText();
+                       rp.paintText();
                        if (rit + 1 == re)
                                rp.paintLast();
                }
@@ -1000,22 +1004,6 @@ void paintText(BufferView & bv,
                yy += par.descent();
        }
 
-       // Cache one paragraph above and one below
-       // Note MV: this cannot be suppressed even for singlepar.
-       // Try viewing the User Guide Mobius figure
-
-       if (vi.p1 > 0) {
-               text.redoParagraph(bv, vi.p1 - 1);
-               bv.coordCache().parPos()[&text][vi.p1 - 1] =
-                       Point(0, vi.y1 - text.getPar(vi.p1 - 1).descent());
-       }
-
-       if (vi.p2 < pit_type(text.paragraphs().size()) - 1) {
-               text.redoParagraph(bv, vi.p2 + 1);
-               bv.coordCache().parPos()[&text][vi.p2 + 1] =
-                       Point(0, vi.y2 + text.getPar(vi.p2 + 1).ascent());
-       }
-
        // and grey out above (should not happen later)
 //     lyxerr << "par ascent: " << text.getPar(vi.p1).ascent() << endl;
        if (vi.y1 > 0 && !vi.singlepar)