# HG changeset patch # User ladanyi # Date 1146140409 0 # Node ID 780e27579198877114ad9551cfa2010900ae2098 # Parent 2c5f81b352692490f281d79533dba8f1e682344d filter loop edges diff -r 2c5f81b35269 -r 780e27579198 gui/mapstorage.cc --- a/gui/mapstorage.cc Tue Apr 25 14:48:50 2006 +0000 +++ b/gui/mapstorage.cc Thu Apr 27 12:20:09 2006 +0000 @@ -268,6 +268,7 @@ if (*it == "label") { //std::cout << "read id edgemap" << std::endl; + read_edge_id = true; } else { @@ -366,6 +367,20 @@ } } + // filter loop edges + for (EdgeIt e(graph); e != INVALID; ++e) + { + if (graph.source(e) == graph.target(e)) + { + std::cerr << "Removed loop edge " << (*edgemap_storage["label"])[e] + << " (from " << (*nodemap_storage["label"])[graph.source(e)] + << ", to " << (*nodemap_storage["label"])[graph.target(e)] << ")." + << std::endl; + + graph.erase(e); + } + } + return 0; }