commit a0fb2f05c9358f13705c276aea8239be3e0e3d30
Author: Juergen Spitzmueller <[email protected]>
Date: Wed May 16 08:35:21 2018 +0200
Do not start from a non-relevant parent in Buffer cloning.
(cherry picked from commit e077255aea9d8380e1efcef00e90b822d19bc5d3)
---
src/Buffer.cpp | 4 ++--
src/Buffer.h | 6 +++---
src/frontends/qt4/GuiView.cpp | 4 ++--
status.23x | 3 ++-
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 4ea890a..6d0fd4f 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -570,13 +570,13 @@ Buffer::~Buffer()
}
-Buffer * Buffer::cloneFromMaster() const
+Buffer * Buffer::cloneWithChildren() const
{
BufferMap bufmap;
cloned_buffers.push_back(new CloneList);
CloneList * clones = cloned_buffers.back();
- masterBuffer()->cloneWithChildren(bufmap, clones);
+ cloneWithChildren(bufmap, clones);
// make sure we got cloned
BufferMap::const_iterator bit = bufmap.find(this);
diff --git a/src/Buffer.h b/src/Buffer.h
index b666b66..57efb8d 100644
--- a/src/Buffer.h
+++ b/src/Buffer.h
@@ -157,9 +157,9 @@ public:
/// Destructor
~Buffer();
- /// Clones the entire structure of which this Buffer is part, starting
- /// with the master and cloning all the children, too.
- Buffer * cloneFromMaster() const;
+ /// Clones the entire structure of which this Buffer is part,
+ /// cloning all the children, too.
+ Buffer * cloneWithChildren() const;
/// Just clones this single Buffer. For autosave.
Buffer * cloneBufferOnly() const;
///
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index 0eb48cf..1dda363 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -3598,10 +3598,10 @@ bool GuiView::GuiViewPrivate::asyncBufferProcessing(
#if EXPORT_in_THREAD
if (allow_async) {
GuiViewPrivate::busyBuffers.insert(used_buffer);
- Buffer * cloned_buffer = used_buffer->cloneFromMaster();
+ Buffer * cloned_buffer = used_buffer->cloneWithChildren();
if (!cloned_buffer) {
Alert::error(_("Export Error"),
-
_("Error cloning the Buffer."));
+ _("Error cloning the Buffer."));
return false;
}
QFuture<Buffer::ExportStatus> f = QtConcurrent::run(
diff --git a/status.23x b/status.23x
index c78c671..0e2dc52 100644
--- a/status.23x
+++ b/status.23x
@@ -48,7 +48,8 @@ What's new
* DOCUMENT INPUT/OUTPUT
-
+- When cloning a buffer, do not start from a parent if it is not the
+ current master (e.g., when compiling a child alone).
* USER INTERFACE