]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt/TocWidget.cpp
Make code a bit easier to read
[lyx.git] / src / frontends / qt / TocWidget.cpp
index ef1a28936eaeba3d158467b052e625c7a0ca7e9b..03d870a5f4c37d7123348cf91cc93e1b9646c61e 100644 (file)
@@ -193,7 +193,6 @@ bool TocWidget::getStatus(Cursor & cur, FuncRequest const & cmd,
 void TocWidget::doDispatch(Cursor & cur, FuncRequest const & cmd,
                DispatchResult & dr)
 {
-
        Inset * inset = itemInset();
 
        QModelIndex const & index = tocTV->currentIndex();
@@ -379,7 +378,6 @@ void TocWidget::outline(FuncCode func_code)
 
 void TocWidget::sendDispatch(FuncRequest fr)
 {
-
        fr.setViewOrigin(&gui_view_);
        GuiWorkArea * old_wa = gui_view_.currentWorkArea();
        GuiWorkArea * doc_wa = gui_view_.currentMainWorkArea();
@@ -503,6 +501,7 @@ void TocWidget::updateView()
                finishUpdateView();
                timer_->start(300);
        }
+       keep_expanded_ = false;
 }
 
 
@@ -615,6 +614,8 @@ void TocWidget::init(QString const & str)
        typeCO->setCurrentIndex(new_index);
        typeCO->blockSignals(false);
        updateViewNow();
+       if (persistent_)
+               setTreeDepth(depth_);
 }
 
 } // namespace frontend