mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-07 09:46:54 +00:00
Fix crash when a user removes the underlying figure of a graphic inset that has been copied and pasted (Bug 4108)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@19611 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9475d1f290
commit
e025b9fa98
@ -56,6 +56,8 @@ public:
|
|||||||
Image::ImagePtr image_;
|
Image::ImagePtr image_;
|
||||||
/// This signal is emitted when the image loading status changes.
|
/// This signal is emitted when the image loading status changes.
|
||||||
boost::signal<void()> signal_;
|
boost::signal<void()> signal_;
|
||||||
|
/// The connection of the signal StatusChanged
|
||||||
|
boost::signals::connection sc_;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
///
|
///
|
||||||
@ -222,6 +224,9 @@ void Loader::Impl::resetFile(FileName const & file)
|
|||||||
|
|
||||||
if (!old_file.empty()) {
|
if (!old_file.empty()) {
|
||||||
continue_monitoring = cached_item_->monitoring();
|
continue_monitoring = cached_item_->monitoring();
|
||||||
|
// cached_item_ is going to be reset, so the connected
|
||||||
|
// signal needs to be disconnected (Bug 4108).
|
||||||
|
sc_.disconnect();
|
||||||
cached_item_.reset();
|
cached_item_.reset();
|
||||||
Cache::get().remove(old_file);
|
Cache::get().remove(old_file);
|
||||||
}
|
}
|
||||||
@ -243,7 +248,7 @@ void Loader::Impl::resetFile(FileName const & file)
|
|||||||
if (continue_monitoring && !cached_item_->monitoring())
|
if (continue_monitoring && !cached_item_->monitoring())
|
||||||
cached_item_->startMonitoring();
|
cached_item_->startMonitoring();
|
||||||
|
|
||||||
cached_item_->connect(boost::bind(&Impl::statusChanged, this));
|
sc_ = cached_item_->connect(boost::bind(&Impl::statusChanged, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,6 +67,8 @@ What's new
|
|||||||
- Fix crash when using the LFUN 'buffer-write-as' with an argument
|
- Fix crash when using the LFUN 'buffer-write-as' with an argument
|
||||||
that is not an absolute path (Bug 4135).
|
that is not an absolute path (Bug 4135).
|
||||||
|
|
||||||
|
- Fix crash when a user removes the underlying figure of a graphic inset
|
||||||
|
that has been copied and pasted (Bug 4108).
|
||||||
|
|
||||||
* DOCUMENTATION
|
* DOCUMENTATION
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user