]> git.lyx.org Git - lyx.git/blobdiff - src/BufferList.cpp
Try even harder to obtain an instant preview
[lyx.git] / src / BufferList.cpp
index de5a7ab2ad56fd327d8bbe47aac146b1d2f55c77..68a1e808cb07ab98672b4f5a49185e7dba0f4f05 100644 (file)
@@ -154,11 +154,9 @@ void BufferList::closeAll()
 }
 
 
-FileNameList const & BufferList::fileNames() const
+FileNameList BufferList::fileNames() const
 {
-       // FIXME THREAD
-       static FileNameList nvec;
-       nvec.clear();
+       FileNameList nvec;
        BufferStorage::const_iterator it = bstore.begin();
        BufferStorage::const_iterator end = bstore.end();
        for (; it != end; ++it) {
@@ -346,9 +344,18 @@ void BufferList::recordCurrentAuthor(Author const & author)
 }
 
 
+void BufferList::updatePreviews()
+{
+       BufferStorage::iterator it = bstore.begin();
+       BufferStorage::iterator end = bstore.end();
+       for (; it != end; ++it)
+               (*it)->updatePreviews();
+}
+
+
 int BufferList::bufferNum(FileName const & fname) const
 {
-       FileNameList const & buffers = fileNames();
+       FileNameList const buffers(fileNames());
        FileNameList::const_iterator cit =
                find(buffers.begin(), buffers.end(), fname);
        if (cit == buffers.end())