]> git.lyx.org Git - features.git/commitdiff
Correct ugly/wrong code introduced in r32738. parent will never be equal to buf.
authorVincent van Ravesteijn <vfr@lyx.org>
Thu, 7 Jan 2010 14:25:15 +0000 (14:25 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Thu, 7 Jan 2010 14:25:15 +0000 (14:25 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32831 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiView.cpp

index b36852479e64b77ebe9175861450f7a5f94985d4..f0232b21330f47d094d7409a0db432034c8ac7f3 100644 (file)
 #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();