]> git.lyx.org Git - features.git/commitdiff
If we switch via the mouse, we need to update the Buffer
authorRichard Heck <rgheck@comcast.net>
Fri, 13 Jan 2012 03:31:48 +0000 (03:31 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 13 Jan 2012 03:31:48 +0000 (03:31 +0000)
after we switch.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40610 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiWorkArea.cpp

index e3bb5260a854593d5a8b9eb89d0bb3dea42d0008..f3b9cc8a7b94360ccd5cead829ef9df62bea5c95 100644 (file)
@@ -761,8 +761,10 @@ void GuiWorkArea::contextMenuEvent(QContextMenuEvent * e)
 void GuiWorkArea::focusInEvent(QFocusEvent * e)
 {
        LYXERR(Debug::DEBUG, "GuiWorkArea::focusInEvent(): " << this << endl);
-       if (d->lyx_view_->currentWorkArea() != this)
+       if (d->lyx_view_->currentWorkArea() != this) {
                d->lyx_view_->setCurrentWorkArea(this);
+               d->lyx_view_->currentWorkArea()->bufferView().buffer().updateBuffer();
+       }
 
        startBlinkingCursor();
        QAbstractScrollArea::focusInEvent(e);