diff --git a/src/graph/GraphView.cpp b/src/graph/GraphView.cpp index 4aa74b0f6b9102332aaa2db4317ca59dd7f4aa74..b13338160257cf9bdeb2b3a86a3f6ff70de5bc78 100644 --- a/src/graph/GraphView.cpp +++ b/src/graph/GraphView.cpp @@ -91,7 +91,12 @@ void Aidge::GraphView::save(std::string path, bool verbose, bool showProducers) } if (node_ptr == mRootNode) { - nodeCls += "_rootCls"; + if (nodeCls.empty()) { + nodeCls = ":::rootCls"; + } + else { + nodeCls += "_rootCls"; + } } if (node_ptr == mRootNode || node_ptr->type() != "Producer" || showProducers) { @@ -175,7 +180,7 @@ void Aidge::GraphView::save(std::string path, bool verbose, bool showProducers) std::fprintf(fp, "classDef producerCls fill:#ccf\n"); std::fprintf(fp, "classDef genericCls fill:#f9f9ff,stroke-width:1px,stroke-dasharray: 5 5\n"); std::fprintf(fp, "classDef metaCls stroke-width:5px\n"); - std::fprintf(fp, "classDef _rootCls stroke:#f00\n"); + std::fprintf(fp, "classDef rootCls stroke:#f00\n"); std::fprintf(fp, "classDef producerCls_rootCls stroke:#f00,fill:#ccf\n"); std::fprintf(fp, "classDef genericCls_rootCls stroke:#f00,fill:#f9f9ff,stroke-width:1px,stroke-dasharray: 5 5\n"); std::fprintf(fp, "classDef metaCls_rootCls stroke:#f00,stroke-width:5px\n");