Georg Baum wrote:
Abdelrazak Younes wrote:
Index: frontends/LyXView.C
===================================================================
--- frontends/LyXView.C (revision 14813)
+++ frontends/LyXView.C (working copy)
@@ -139,22 +139,19 @@
work_area_->bufferView().setBuffer(b);
- if (work_area_->bufferView().buffer())
- {
+ if (work_area_->bufferView().buffer()) {
// Buffer-dependent dialogs should be updated or
// hidden. This should go here because some dialogs (eg
ToC)
// require bv_->text.
getDialogs().updateBufferDependent(true);
+ connectBuffer(*work_area_->bufferView().buffer());
+ setLayout(work_area_->bufferView().firstLayout());
}
updateMenubar();
updateToolbars();
updateLayoutChoice();
updateWindowTitle();
- if (b) {
- connectBuffer(*b);
- setLayout(work_area_->bufferView().firstLayout());
- }
redrawWorkArea();
}
This looks wrong (the rest looks OK). Do you know that b !=
work_area_->bufferView().buffer() is possible even after a
work_area_->bufferView().setBuffer(b)?
This was indeed the case before my patch but look also at my
BufferView_pimp change.
I've tested this patch with a lot of buffer switching and deletion.
Abdel.