mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Make sure to associate each line of the exported latex code to the id/pos
of the first call of TexRow::start(), rather than the last before a newline. This is what was causing some recent grief (bug #7325, for example). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37894 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
98f381158e
commit
732212f233
@ -32,8 +32,12 @@ void TexRow::reset()
|
||||
|
||||
void TexRow::start(int id, int pos)
|
||||
{
|
||||
if (started)
|
||||
return;
|
||||
|
||||
lastid = id;
|
||||
lastpos = pos;
|
||||
started = true;
|
||||
}
|
||||
|
||||
|
||||
@ -42,6 +46,7 @@ void TexRow::newline()
|
||||
int const id = lastid;
|
||||
RowList::value_type tmp(id, lastpos);
|
||||
rowlist.push_back(tmp);
|
||||
started = false;
|
||||
}
|
||||
|
||||
void TexRow::newlines(int num_lines)
|
||||
|
@ -26,7 +26,7 @@ namespace lyx {
|
||||
class TexRow {
|
||||
public:
|
||||
///
|
||||
TexRow() : lastid(-1), lastpos(-1) {}
|
||||
TexRow() : lastid(-1), lastpos(-1), started(false) {}
|
||||
|
||||
/// Clears structure
|
||||
void reset();
|
||||
@ -90,6 +90,8 @@ private:
|
||||
int lastid;
|
||||
/// Last position
|
||||
int lastpos;
|
||||
/// Is id/pos already registered for current row?
|
||||
bool started;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user