]> git.lyx.org Git - features.git/blobdiff - src/frontends/LyXView.C
Free BufferView from LyXView!
[features.git] / src / frontends / LyXView.C
index 8a8274e966e0d998b92618004f6d4dbd96b5ca5c..2333f8d8883d4926ae37a1caa94cdde4c2c22a06 100644 (file)
@@ -209,6 +209,7 @@ void LyXView::disconnectBuffer()
        timerConnection_.disconnect();
        readonlyConnection_.disconnect();
        closingConnection_.disconnect();
+       layout_changed_connection_.disconnect();
 }
 
 
@@ -222,6 +223,8 @@ void LyXView::connectBufferView(BufferView & bv)
                        boost::bind(&LyXView::showInsetDialog, this, _1, _2, _3));
        update_dialog_connection_ = bv.updateDialog.connect(
                        boost::bind(&LyXView::updateDialog, this, _1, _2));
+       layout_changed_connection_ = bv.layoutChanged.connect(
+                       boost::bind(&Toolbars::setLayout, toolbars_.get(), _1));
 }
 
 
@@ -283,12 +286,6 @@ BufferView * LyXView::view() const
 }
 
 
-void LyXView::setLayout(string const & layout)
-{
-       toolbars_->setLayout(layout);
-}
-
-
 void LyXView::updateToolbars()
 {
        bool const math = work_area_->bufferView().cursor().inMathed();