#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"
// 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);
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();