From: Angus Leeming Date: Wed, 2 Apr 2003 09:10:08 +0000 (+0000) Subject: Explicitly tell the frontends about the current Layout when opening a X-Git-Tag: 1.6.10~17085 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b92fba65e8ef6c69f9edc31148052fbe6f7ad233;p=lyx.git Explicitly tell the frontends about the current Layout when opening a new buffer. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6677 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index f067de6e6f..2d0aa34f85 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -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_); } diff --git a/src/ChangeLog b/src/ChangeLog index ceb8c4a3cb..ed6bb61813 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-04-01 Angus Leeming + + * BufferView_pimpl.C (buffer): ensure that the Layout is correct + in the frontends. + 2003-04-02 John Levon * lyxtext.h: