]> git.lyx.org Git - features.git/blobdiff - src/graphics/GraphicsLoader.cpp
InsetIndex: hide printTree behind a LYX_INSET_INDEX_DEBUG flag
[features.git] / src / graphics / GraphicsLoader.cpp
index 2316a4ac693449c35f7e668c3e8a6766ce5ae7ca..dc3f7c5e357672e315934797408e5e4d0112693d 100644 (file)
@@ -192,9 +192,9 @@ public:
        /// We modify a local copy of the image once it is loaded.
        ImagePtr image_;
        /// This signal is emitted when the image loading status changes.
-       signals2::signal<void()> signal_;
+       signal<void()> signal_;
        /// The connection of the signal statusChanged
-       signals2::scoped_connection connection_;
+       scoped_connection connection_;
 
        double displayPixelRatio() const
        {
@@ -364,7 +364,7 @@ void Loader::setDisplayPixelRatio(double scale)
 }
 
 
-signals2::connection Loader::connect(slot const & slot) const
+connection Loader::connect(slot const & slot) const
 {
        return pimpl_->signal_.connect(slot);
 }
@@ -400,7 +400,7 @@ void Loader::Impl::resetFile(FileName const & file)
        // new file.
        bool continue_monitoring = false;
 
-       if (!old_file.empty()) {
+       if (cached_item_ && !old_file.empty()) {
                continue_monitoring = cached_item_->monitoring();
                // cached_item_ is going to be reset, so the connected
                // signal needs to be disconnected.