]> git.lyx.org Git - lyx.git/commitdiff
Explicitly tell the frontends about the current Layout when opening a
authorAngus Leeming <leeming@lyx.org>
Wed, 2 Apr 2003 09:10:08 +0000 (09:10 +0000)
committerAngus Leeming <leeming@lyx.org>
Wed, 2 Apr 2003 09:10:08 +0000 (09:10 +0000)
new buffer.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6677 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView_pimpl.C
src/ChangeLog

index f067de6e6f48e0bbf26d9e862f83cb19f4f09b06..2d0aa34f857fb94433b44ebfa7725ae2328ba8a2 100644 (file)
@@ -186,7 +186,7 @@ void BufferView::Pimpl::buffer(Buffer * b)
                // FIXME: needed when ?
                bv_->text->top_y(screen().topCursorVisible(bv_->text->cursor, bv_->text->top_y()));
 
-               // Similarly, buffer-dependent dialogs should be updated or
+               // Buffer-dependent dialogs should be updated or
                // hidden. This should go here because some dialogs (eg ToC)
                // require bv_->text.
                owner_->getDialogs().updateBufferDependent(true);
@@ -209,6 +209,13 @@ void BufferView::Pimpl::buffer(Buffer * b)
        owner_->updateLayoutChoice();
        owner_->updateWindowTitle();
 
+       if (buffer_) {
+               // Don't forget to update the Layout
+               string const layoutname =
+                       bv_->text->cursor.par()->layout()->name();
+               owner_->setLayout(layoutname);
+       }
+
        if (grfx::Previews::activated() && buffer_)
                grfx::Previews::get().generateBufferPreviews(*buffer_);
 }
index ceb8c4a3cbd60dd112ce56f608acd790018b3e62..ed6bb618132092c4cab7ba939648258b398023b2 100644 (file)
@@ -1,3 +1,8 @@
+2003-04-01  Angus Leeming  <leeming@lyx.org>
+
+       * BufferView_pimpl.C (buffer): ensure that the Layout is correct
+       in the frontends.
+
 2003-04-02  John Levon  <levon@movementarian.org>
 
        * lyxtext.h: