From: Guillaume MM Date: Wed, 3 Jan 2018 18:58:50 +0000 (+0100) Subject: Fix preview with a nested preview not being shown (#10795) X-Git-Tag: 2.3.0rc2~89 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=225d47f29880f62c0e53dfabccf5a9e1bd2488f7;p=features.git Fix preview with a nested preview not being shown (#10795) Regression at db581113. (cherry picked from commit 94c65074e029937b549f5ed5af1001fadbe408be) --- diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index 22b0f23ead..ac14fbb6a9 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -239,7 +239,7 @@ private: /// We don't own this static lyx::Converter const * pconverter_; - signals2::scoped_connection connection_; + Trackable trackable_; }; @@ -738,10 +738,9 @@ void PreviewLoader::Impl::startLoading(bool wait) // Initiate the conversion from LaTeX to bitmap images files. ForkedCall::sigPtr convert_ptr = make_shared(); - // This is a scoped connection - connection_ = convert_ptr->connect([this](pid_t pid, int retval){ - finishedGenerating(pid, retval); - }); + convert_ptr->connect(ForkedProcess::slot([this](pid_t pid, int retval){ + finishedGenerating(pid, retval); + }).track_foreign(trackable_.p())); ForkedCall call(buffer_.filePath()); int ret = call.startScript(command, convert_ptr);