]> 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 6074cd07b950f0e61f8c7bb5ad589bd1b43c3e12..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();
                }