]> granicus.if.org Git - graphviz/commitdiff
Add warning about non-trivial flat edges between adjacent record-shaped nodes.
authorEmden R. Gansner <erg@alum.mit.edu>
Fri, 25 Jul 2014 19:42:02 +0000 (15:42 -0400)
committerEmden R. Gansner <erg@alum.mit.edu>
Fri, 25 Jul 2014 19:42:02 +0000 (15:42 -0400)
lib/dotgen/dotsplines.c

index 5a72699e72edc1cd0c241a0feb29fded0793edaa..bcbf65d44c16be23189b53180db48788d48de100 100644 (file)
@@ -1182,8 +1182,19 @@ make_flat_adj_edges(graph_t* g, path* P, edge_t** edges, int ind, int cnt, edge_
     pointf   del;
     edge_t* hvye = NULL;
     attr_state_t* attrs;
+    static int warned;
 
     tn = agtail(e0), hn = aghead(e0);
+    if ((shapeOf(tn) == SH_RECORD) || (shapeOf(tn) == SH_RECORD)) {
+       if (!warned) {
+           warned = 1;
+           agerr (AGWARN, "flat edge between adjacent nodes one of which has a record shape - replace records with HTML-like labels\n");
+           agerr(AGPREV, "  Edge %s %s %s\n",
+                        agnameof(tn), agisdirected(g)?"->":"--", agnameof(hn));
+           
+       }
+       return;
+    }
     for (i = 0; i < cnt; i++) {
        e = edges[ind + i];
        if (ED_label(e)) labels++;