]> git.lyx.org Git - lyx.git/blobdiff - src/BufferList.cpp
Better debug ouput
[lyx.git] / src / BufferList.cpp
index 422457d0bb20d091bb8fb7a58252e53f3f302756..f9a059b61caa801b82f935e1ba7daad7eb8d0cbd 100644 (file)
@@ -232,8 +232,10 @@ bool BufferList::exists(FileName const & fname) const
 }
 
 
-bool BufferList::isLoaded(Buffer const * b) const
+ bool BufferList::isLoaded(Buffer const * b) const
 {
+       if (!b)
+               return false;
        BufferStorage::const_iterator cit =
                find(bstore.begin(), bstore.end(), b);
        return cit != bstore.end();
@@ -336,4 +338,17 @@ bool BufferList::releaseChild(Buffer * parent, Buffer * child)
 }
 
 
+void BufferList::changed(bool update_metrics) const
+{
+       BufferStorage::const_iterator it = bstore.begin();
+       BufferStorage::const_iterator end = bstore.end();
+       for (; it != end; ++it)
+               (*it)->changed(update_metrics);
+       it = binternal.begin();
+       end = binternal.end();
+       for (; it != end; ++it)
+               (*it)->changed(update_metrics);
+}
+
+
 } // namespace lyx