From 785418bd2bb5d4ccfc51393b3cfe868dfbf08ebe Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Thu, 7 Jan 2010 14:25:15 +0000 Subject: [PATCH] Correct ugly/wrong code introduced in r32738. parent will never be equal to buf. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32831 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiView.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index b36852479e..f0232b2133 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -21,10 +21,10 @@ #include "GuiApplication.h" #include "GuiCommandBuffer.h" #include "GuiCompleter.h" -#include "GuiWorkArea.h" #include "GuiKeySymbol.h" #include "GuiToc.h" #include "GuiToolbar.h" +#include "GuiWorkArea.h" #include "LayoutBox.h" #include "Menus.h" #include "TocModel.h" @@ -2421,7 +2421,6 @@ void GuiView::reloadBuffer(Buffer * buf) // e.g., read-only status could have changed due to version control filename.refresh(); Buffer const * parent = buf->parent(); - bool const is_child = parent != buf; // The user has already confirmed that the changes, if any, should // be discarded. So we just release the Buffer and don't call closeBuffer(); theBufferList().release(buf); @@ -2430,7 +2429,7 @@ void GuiView::reloadBuffer(Buffer * buf) docstring str; if (buf) { // re-allocate master if necessary - if (is_child && theBufferList().isLoaded(parent) + if (parent && theBufferList().isLoaded(parent) && buf->parent() != parent) buf->setParent(parent); buf->updateLabels(); -- 2.39.5