mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix bug #9151 (Wrong reverse search for images and tables).
If the reverse position corresponds to an inset, its paragraph id does not follow the main text numbering. Typically, an inset has only a few paragraph, so that we would jump near the beginning of the document. In this way we at least jump at the beginning of the inset.
This commit is contained in:
parent
7d31194085
commit
44e09b223e
@ -2295,7 +2295,12 @@ void BufferView::setCursorFromRow(int row)
|
|||||||
DocIterator const dit = buffer_.getParFromID(tmpid);
|
DocIterator const dit = buffer_.getParFromID(tmpid);
|
||||||
if (dit == doc_iterator_end(&buffer_))
|
if (dit == doc_iterator_end(&buffer_))
|
||||||
posvalid = false;
|
posvalid = false;
|
||||||
else {
|
else if (dit.depth() > 1) {
|
||||||
|
// We are an inset.
|
||||||
|
setCursor(dit);
|
||||||
|
recenter();
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
newpit = dit.pit();
|
newpit = dit.pit();
|
||||||
// now have to check pos.
|
// now have to check pos.
|
||||||
newpos = tmppos;
|
newpos = tmppos;
|
||||||
|
Loading…
Reference in New Issue
Block a user