]> git.lyx.org Git - features.git/commitdiff
Call DEPM properly when going somewhere with outliner.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 26 Mar 2015 09:27:59 +0000 (10:27 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 26 Mar 2015 09:45:48 +0000 (10:45 +0100)
LFUN_PARAGRAPH_GOTO used to do a plain setCursor, whereas the more elaborate mouseSetCursor is a much better version.

Fixes bug #9479.

src/BufferView.cpp

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