Try this patch. It seems to me we shouldn't disconnect until we're ready to connect. It's possible that the connectBuffer() call should go earlier, but I think this is right. It's where it was before, anyway.
Richard -- ================================================================== Richard G Heck, Jr Professor of Philosophy Brown University http://frege.brown.edu/heck/ ================================================================== Get my public key from http://sks.keyserver.penguin.de Hash: 0x1DE91F1E66FFBDEC Learn how to sign your email using Thunderbird and GnuPG at: http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto
Index: LyXView.cpp =================================================================== --- LyXView.cpp (revision 19264) +++ LyXView.cpp (working copy) @@ -133,10 +133,8 @@ // parentfilename will be used in case when we switch to a child // document (hence when child_document is true) string parentfilename; - if (oldBuffer) { + if (oldBuffer) parentfilename = oldBuffer->fileName(); - disconnectBuffer(); - } if (!b && theBufferList().empty()) getDialogs().hideBufferDependent(); @@ -160,7 +158,7 @@ // must update the labels and section numbering of its master // Buffer. updateLabels(*oldBuffer->getMasterBuffer()); - + //if (oldBuffer) disconnectBuffer(); done automatically connectBuffer(*newBuffer); /* FIXME: We need to rebuild the Toc dialog before the others even @@ -178,7 +176,8 @@ // hidden. This should go here because some dialogs (eg ToC) // require bv_->text. getDialogs().updateBufferDependent(true); - } + } else + disconnectBuffer(); if (quitting) return;