]> git.lyx.org Git - lyx.git/blobdiff - src/toc.C
another fix
[lyx.git] / src / toc.C
index a4e2e30167ab9b9b0d89d6bbcd88afb5f46ccbcb..685108a81bab1028e89f3188ce915fdb39c61d45 100644 (file)
--- a/src/toc.C
+++ b/src/toc.C
@@ -23,7 +23,6 @@
 #include "toc.h"
 #include "buffer.h"
 #include "frontends/LyXView.h"
-#include "lyxfunc.h"
 #include "LyXAction.h"
 #include "paragraph.h"
 #include "insets/insetfloat.h"
@@ -46,7 +45,7 @@ string const TocItem::asString() const
 void TocItem::goTo(LyXView & lv_) const
 {
        string const tmp = tostr(par->id());
-       lv_.getLyXFunc()->dispatch(FuncRequest(LFUN_GOTO_PARAGRAPH, tmp));
+       lv_.dispatch(FuncRequest(LFUN_GOTO_PARAGRAPH, tmp));
 }
 
 
@@ -72,7 +71,7 @@ TocList const getTocList(Buffer const * buf)
        TocList toclist;
        if (!buf)
                return toclist;
-       Paragraph * par = buf->paragraph;
+       Paragraph * par = &*(buf->paragraphs.begin());
 
        LyXTextClass const & textclass = buf->params.getLyXTextClass();