]> git.lyx.org Git - features.git/commitdiff
Do not start from a non-reveant parent in Buffer cloning.
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 16 May 2018 06:35:21 +0000 (08:35 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 16 May 2018 06:35:21 +0000 (08:35 +0200)
src/Buffer.cpp
src/Buffer.h
src/frontends/qt4/GuiView.cpp

index 47db5f0552a31bb5a5d4647b354f567c440a42be..b436a0f8a55bf591da3de515de9468e9b4059914 100644 (file)
@@ -562,13 +562,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);
index 9f40e74bd36bb1c9567d0dc3b546befc488fd766..eb6c1a8767c4cd65716f52ce21f48fcf27b184b1 100644 (file)
@@ -159,9 +159,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;
        ///
index 104214ee43538d5b9fa37ccf4d6f4290567a165f..47a56882b15bdfeedbf7bade829ea9343d4fd315 100644 (file)
@@ -3656,10 +3656,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(