mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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
This commit is contained in:
parent
a6b3f1e42d
commit
785418bd2b
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user