mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
TexRow: fix return value on invalid row input.
Caused loops with Sweave & Knittr compilation.
This commit is contained in:
parent
ec93693aef
commit
6f2e86dff2
@ -204,15 +204,12 @@ void TexRow::append(TexRow const & texrow)
|
||||
bool TexRow::getIdFromRow(int row, int & id, int & pos) const
|
||||
{
|
||||
TextEntry t = text_none;
|
||||
bool ret = false;
|
||||
if (row <= int(rowlist_.size()))
|
||||
while (row > 0 && isNone(t = rowlist_[row - 1].getTextEntry()))
|
||||
--row;
|
||||
if (row > 0)
|
||||
ret = true;
|
||||
id = t.id;
|
||||
pos = t.pos;
|
||||
return ret;
|
||||
return !isNone(t);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user