The reason is that closing a Buffer triggers an update of all opened
dialogs when dispatching LFUN_DIALOG_UPDATE (hence the patch). The path
is as following:
setBuffer() -> updateBufferDependent() -> RestoreButton() -> LFUN
The problem here is that the Toc dialog has not been reconstructed
(because it comes after in the list of dialogs).
This patch should definitely go _before_ 1.5.0; OK?
Abdel.
Index: LyXFunc.cpp
===================================================================
--- LyXFunc.cpp (revision 19003)
+++ LyXFunc.cpp (working copy)
@@ -1838,8 +1838,10 @@
}
}
if (!quitting) {
- lyx_view_->updateMenubar();
- lyx_view_->updateToolbars();
+ if (cmd.action != LFUN_DIALOG_UPDATE) {
+ lyx_view_->updateMenubar();
+ lyx_view_->updateToolbars();
+ }
// Some messages may already be translated, so we cannot use _()
sendDispatchMessage(translateIfPossible(getMessage()), cmd);
}