]> git.lyx.org Git - lyx.git/blobdiff - src/graph.C
Fix encoding of converters path and arguments
[lyx.git] / src / graph.C
index 66daec8263aaf5fb4889c245705a617cd16b2775..93533274320245531a83823130879494b04840c7 100644 (file)
 
 #include <algorithm>
 
+
+namespace lyx {
+
 using std::vector;
 using std::reverse;
+using std::fill;
 
 
 int Graph::bfs_init(int s, bool clear_visited)
@@ -77,11 +81,14 @@ Graph::getReachable(int from, bool only_viewable,
                int const i = Q_.front();
                Q_.pop();
                Format const & format = formats.get(i);
-               if (format.name() == "lyx")
-                       continue;
-               if (!only_viewable || !format.viewer().empty() ||
-                   format.isChildFormat())
+               if (!only_viewable || !format.viewer().empty())
                        result.push_back(i);
+               else if (format.isChildFormat()) {
+                       Format const * const parent =
+                               formats.getFormat(format.parentFormat());
+                       if (parent && !parent->viewer().empty())
+                               result.push_back(i);
+               }
 
                vector<int>::const_iterator cit =
                        vertices_[i].out_vertices.begin();
@@ -193,3 +200,6 @@ void Graph::addEdge(int s, int t)
 }
 
 vector<Graph::Vertex> Graph::vertices_;
+
+
+} // namespace lyx