Call DEPM properly when going somewhere with outliner.

LFUN_PARAGRAPH_GOTO used to do a plain setCursor, whereas the more elaborate mouseSetCursor is a much better version.

Fixes bug #9479.
This commit is contained in:
Jean-Marc Lasgouttes 2015-03-26 10:27:59 +01:00
parent 6d3019c7de
commit 67e6c45f80

View File

@ -1415,20 +1415,21 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
for (Buffer * b = &buffer_; i == 0 || b != &buffer_; for (Buffer * b = &buffer_; i == 0 || b != &buffer_;
b = theBufferList().next(b)) { b = theBufferList().next(b)) {
DocIterator dit = b->getParFromID(id); Cursor cur(*this);
if (dit.atEnd()) { cur.setCursor(b->getParFromID(id));
if (cur.atEnd()) {
LYXERR(Debug::INFO, "No matching paragraph found! [" << id << "]."); LYXERR(Debug::INFO, "No matching paragraph found! [" << id << "].");
++i; ++i;
continue; continue;
} }
LYXERR(Debug::INFO, "Paragraph " << dit.paragraph().id() LYXERR(Debug::INFO, "Paragraph " << cur.paragraph().id()
<< " found in buffer `" << " found in buffer `"
<< b->absFileName() << "'."); << b->absFileName() << "'.");
if (b == &buffer_) { if (b == &buffer_) {
// Set the cursor // Set the cursor
dit.pos() = pos; cur.pos() = pos;
setCursor(dit); mouseSetCursor(cur);
dr.screenUpdate(Update::Force | Update::FitCursor); dr.screenUpdate(Update::Force | Update::FitCursor);
} else { } else {
// Switch to other buffer view and resend cmd // Switch to other buffer view and resend cmd