Remove variable y_top that was computed but not used.

This commit is contained in:
Jean-Marc Lasgouttes 2015-10-12 11:55:38 +02:00
parent b6b263b9fc
commit 44acd4a3cb
2 changed files with 5 additions and 26 deletions

View File

@ -357,7 +357,7 @@ void RowPainter::paintDepthBar() const
}
int RowPainter::paintAppendixStart(int y) const
void RowPainter::paintAppendixStart(int y) const
{
FontInfo pb_font = sane_font;
pb_font.setColor(Color_appendix);
@ -377,8 +377,6 @@ int RowPainter::paintAppendixStart(int y) const
pi_.pain.line(int(xo_ + 1), y, text_start, y, Color_appendix);
pi_.pain.line(text_end, y, int(xo_ + width_ - 2), y, Color_appendix);
return 3 * defaultRowHeight();
}
@ -401,40 +399,21 @@ void RowPainter::paintTooLargeMarks(bool const left, bool const right) const
void RowPainter::paintFirst() const
{
BufferParams const & bparams = pi_.base.bv->buffer().params();
Layout const & layout = par_.layout();
int y_top = 0;
// start of appendix?
if (par_.params().startOfAppendix())
y_top += paintAppendixStart(yo_ - row_.ascent() + 2 * defaultRowHeight());
if (bparams.paragraph_separation == BufferParams::ParagraphSkipSeparation
&& pit_ != 0) {
if (layout.latextype == LATEX_PARAGRAPH
&& !par_.getDepth()) {
y_top += bparams.getDefSkip().inPixels(*pi_.base.bv);
} else {
Layout const & playout = pars_[pit_ - 1].layout();
if (playout.latextype == LATEX_PARAGRAPH
&& !pars_[pit_ - 1].getDepth()) {
// is it right to use defskip here, too? (AS)
y_top += bparams.getDefSkip().inPixels(*pi_.base.bv);
}
}
}
paintAppendixStart(yo_ - row_.ascent() + 2 * defaultRowHeight());
bool const is_first =
text_.isFirstInSequence(pit_) || !layout.isParagraphGroup();
//lyxerr << "paintFirst: " << par_.id() << " is_seq: " << is_seq << endl;
if (layout.labelIsInline()
&& (layout.labeltype != LABEL_STATIC || is_first)) {
&& (layout.labeltype != LABEL_STATIC || is_first))
paintLabel();
} else if (is_first && layout.labelIsAbove()) {
else if (is_first && layout.labelIsAbove())
paintTopLevelLabel();
}
}

View File

@ -63,7 +63,7 @@ private:
void paintStringAndSel(Row::Element const & e);
void paintMisspelledMark(double orig_x, Row::Element const & e) const;
void paintChange(double orig_x , Font const & font, Change const & change) const;
int paintAppendixStart(int y) const;
void paintAppendixStart(int y) const;
void paintInset(Inset const * inset, Font const & font,
Change const & change, pos_type const pos);