The old code did create invalid documents, since the space between the rotate
flag dn the previous flag was removed.
(cherry picked from commit b0664e0c98)
The code that checks whether the cursor was at the end of a row in
Cursor::upDowninText was not able to set boundary correctly. This
causes a hang in because the cursor got stuck on a line and there is an
infinite loop BufferView::dispatch when trying to go down.
The fix is to avoid using the watered-down TextMetrics::x2pos wrapper
around getColumnNearX and use the real thing instead.
Eventually, the last user of x2pos (InsetTabular) should be fixed and
the method should go away.
The two fixes here a obviously right, although it is not clear why they are sufficient to fix the bug. Anyway I cannot reproduce any crash with it.
* the first part just conditions a whole if/else to change_next_pos.changed(). Originally, only the if branch was concerned.
* the second part is to avoid calling CursorSlice::backwardPos() when position is 0. Doing this leads to an assertion.
and Cursors. So just calling InsetText::addToToc for the cells causes
problems, because InsetText::addToToc then adds the cell inset itself
as part of the DocIterator. This then leads to assertions, such as bug
The solution is to refactor InsetText::addToToc so that we can call the
iterating part without adding the inset.
(cherry picked from commit 6a85db2307)
This was an obvious thinko: When pasting a paragraph list the depth of the
pasted paragraphs need to be adjusted, so that no paragraph has a negative
depth afterwards. However, the maximum allowed depth was only adjusted after
the second and following pasted paragraphs. Since the computed value was only
used for the subsequent paragrph this meant that the second paragraph did
still use the same maximum allowed depth as the first one, which came from the
paragraph the text as pasted into. This was wrong e.g. in case the outside
paragraph was a standard paragraph (max_depth = 0), and the first pasted
paragraph was an enumeration (max_depth = 1). Therefore, max_depth needs to
be adjusted also after the first pasted paragaph. Since the adjustment is
done aftre max_depth was used for the current paragraph the condition
mentioned in the comment is still met.
(cherry picked from commit 270201ed67)
The problem was just the faulty use of CursorSlice::at_begin/end(), which does not look for end of cell, but end of inset.
(cherry picked from commit 68202fdf44)
This allows the user to correct the bad input without
having to enter the other fields again in a new dialog.
Patch from Martin Hoffmann.
(cherry picked from commit 27131e655a)
Conflicts:
lib/generate_contributions.py
http://marc.info/?l=lyx-devel&m=138590578911716&w=2
If you look at Buffer.cpp, around line 4351, there was a comment about bug 5699. We are seeing the
same crash. The problem is that, although the master does have a GUI, that GUI is in a different window. So the structureChanged() call we do during updateBuffer() is for the TOC in that window, not the TOC in the window we are actually in. So our TocModel::toc_ has been reset and is invalid, though the widget itself has not been updated and looks fine.
This patch tests whether the master is in the same window as the buffer we are updating.
A problem remains, which is noted in a comment.
(cherry picked from commit 3f62601a8f)
Conflicts:
src/Buffer.cpp