- // first cell on line is not moved:
- line->SetPos(line->GetPosX() + s_indent,
- line->GetPosY() + ypos);
+ // first visible cell on line is not moved:
+ while (line !=cell && !line->IsLinebreakAllowed())
+ {
+ line->SetPos(line->GetPosX() + s_indent,
+ line->GetPosY() + ypos);
+ line = line->GetNext();
+ }
+
+ if (line != cell)
+ {
+ line->SetPos(line->GetPosX() + s_indent,
+ line->GetPosY() + ypos);
+
+ line = line->GetNext();
+ }