Add some more updates on window switch.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20684 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-10-03 08:03:01 +00:00
parent 4461bbc42e
commit 4fc79439ad

View File

@ -738,13 +738,17 @@ bool GuiViewBase::event(QEvent * e)
case QEvent::WindowActivate:
if (d.tab_widget_->count()) {
GuiWorkArea * wa = dynamic_cast<GuiWorkArea *>(d.tab_widget_->currentWidget());
GuiWorkArea * wa = dynamic_cast<GuiWorkArea *>(
d.tab_widget_->currentWidget());
BOOST_ASSERT(wa);
BufferView & bv = wa->bufferView();
connectBufferView(bv);
connectBuffer(bv.buffer());
// The document structure might have changed in another view.
// The document structure, name and dialogs might have
// changed in another view.
updateToc();
updateWindowTitle();
getDialogs().updateBufferDependent(true);
}
return QMainWindow::event(e);