]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.C
don't rm emergency saves ever
[lyx.git] / src / rowpainter.C
index 3d909313b1e775facc1a6789ac85c9bb1e652231..78d2f6545f01eaeb0f88c07c39d2abba5634887e 100644 (file)
@@ -18,6 +18,7 @@
 #include "frontends/font_metrics.h"
 #include "support/LAssert.h"
 #include "paragraph.h"
+#include "paragraph_funcs.h"
 #include "support/textutils.h"
 
 #include "insets/insettext.h"
@@ -80,7 +81,7 @@ int RowPainter::singleWidth(lyx::pos_type pos, char c) const
 
 LyXFont const RowPainter::getLabelFont() const
 {
-       return text_.getLabelFont(bv_.buffer(), &*pit_);
+       return text_.getLabelFont(bv_.buffer(), pit_);
 }
 
 
@@ -673,7 +674,7 @@ void RowPainter::paintFirst()
        if (layout->labeltype >= LABEL_STATIC
            && (layout->labeltype != LABEL_STATIC
                || layout->latextype != LATEX_ENVIRONMENT
-               || pit_->isFirstInSequence())) {
+               || isFirstInSequence(pit_, text_.ownerParagraphs()))) {
 
                LyXFont font = getLabelFont();
                if (!pit_->getLabelstring().empty()) {
@@ -721,7 +722,7 @@ void RowPainter::paintFirst()
 
        // the labels at the top of an environment.
        // More or less for bibliography
-       } else if (pit_->isFirstInSequence() &&
+       } else if (isFirstInSequence(pit_, text_.ownerParagraphs()) &&
                (layout->labeltype == LABEL_TOP_ENVIRONMENT ||
                layout->labeltype == LABEL_BIBLIO ||
                layout->labeltype == LABEL_CENTERED_TOP_ENVIRONMENT)) {
@@ -796,7 +797,7 @@ void RowPainter::paintLast()
        }
 
        bool const is_rtl = pit_->isRightToLeftPar(bv_.buffer()->params);
-       int const endlabel = pit_->getEndLabel();
+       int const endlabel = getEndLabel(pit_, text_.ownerParagraphs());
 
        // draw an endlabel
        switch (endlabel) {