From Cory Riddell, "I've been using the dot plugin and found that our application which sets
the global locale was generating bad dot files. Specifically, the node numbers had comma separators in them (like 1,234 rather than 1234). The attached file simply forces the stringstreams used to build up the dot file to use the "C" locale."
This commit is contained in:
parent
2298cc520c
commit
ec08c4dfea
@ -27,6 +27,12 @@ namespace osgDot {
|
||||
BaseDotVisitor::BaseDotVisitor()
|
||||
{
|
||||
_rankdir = "rankdir = LR;";
|
||||
// Set the locale used by the _nodes and _edges streams to the
|
||||
// classic or "C" locale. This is needed because most of the
|
||||
// Graphviz tools are not locale sensitive and get confused
|
||||
// by id numbers containing commas or periods.
|
||||
_nodes.imbue(std::locale("C"));
|
||||
_edges.imbue(std::locale("C"));
|
||||
}
|
||||
|
||||
BaseDotVisitor::~BaseDotVisitor() {
|
||||
|
Loading…
Reference in New Issue
Block a user