Bug fixes. changed_ was always true...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19901 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-08-29 23:06:14 +00:00
parent 7f17f13bfc
commit 79ba8fe22a
3 changed files with 6 additions and 3 deletions

View File

@ -51,14 +51,12 @@ void Row::setDimension(Dimension const & dim)
void Row::pos(pos_type p)
{
changed_ |= p != pos_;
pos_ = p;
}
void Row::endpos(pos_type p)
{
changed_ |= p != end_;
end_ = p;
}

View File

@ -36,6 +36,8 @@ public:
///
bool changed() const { return changed_; }
///
void setChanged(bool c) { changed_ = c; }
///
void setCrc(size_type crc);
///
void pos(pos_type p);

View File

@ -247,6 +247,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
if (row_index == pm.rows().size())
pm.rows().push_back(Row());
Row & row = pm.rows()[row_index];
row.setChanged(false);
row.pos(first);
row.endpos(end);
row.setDimension(dim);
@ -271,6 +272,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
if (row_index == pm.rows().size())
pm.rows().push_back(Row());
Row & row = pm.rows()[row_index];
row.setChanged(false);
row.pos(first);
row.endpos(first);
row.setDimension(dim);
@ -1021,7 +1023,8 @@ void TextMetrics::drawParagraph(PainterInfo & pi, pit_type pit, int x, int y,
// 12 lines lower):
if (lyxerr.debugging(Debug::PAINTING)) {
if (text_->isMainText(bv_->buffer()))
LYXERR(Debug::PAINTING) << "#";
LYXERR(Debug::PAINTING) << "#" <<
repaintAll << row_has_changed;
else
LYXERR(Debug::PAINTING) << "[" <<
repaintAll << row_has_changed << "]";