diff --git a/src/frontends/LyXView.cpp b/src/frontends/LyXView.cpp index 71b8471d49..a5bf70a1f6 100644 --- a/src/frontends/LyXView.cpp +++ b/src/frontends/LyXView.cpp @@ -111,14 +111,9 @@ Buffer const * LyXView::buffer() const void LyXView::setBuffer(Buffer * newBuffer) { + BOOST_ASSERT(newBuffer); busy(true); - Buffer * oldBuffer = buffer(); - if (oldBuffer == newBuffer) { - busy(false); - return; - } - WorkArea * wa = workArea(*newBuffer); if (wa == 0) { updateLabels(*newBuffer->getMasterBuffer()); diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 60bc88455f..986db386b9 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -892,7 +892,12 @@ void GuiView::setCurrentWorkArea(WorkArea * work_area) GuiWorkArea * wa = dynamic_cast(work_area); BOOST_ASSERT(wa); - d.tab_widget_->setCurrentWidget(wa); + if (wa != d.tab_widget_->currentWidget()) + // Switch to the work area. + d.tab_widget_->setCurrentWidget(wa); + else + // Make sure the work area is up to date. + currentTabChanged(d.tab_widget_->currentIndex()); wa->setFocus(); }