X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgenericgui%2FSceneBlocItem.cxx;h=14b9f482e19154baf198a94869ce8eb88e5874c3;hb=4dae3b5416a884361d80462dc4d6ccb59a6f2503;hp=329bd38e8b3ca4cd503a6f2fcdd62a96e477cc72;hpb=1c3ffebe3d8052af00617aa831f1841049483e8c;p=modules%2Fyacs.git diff --git a/src/genericgui/SceneBlocItem.cxx b/src/genericgui/SceneBlocItem.cxx index 329bd38e8..14b9f482e 100644 --- a/src/genericgui/SceneBlocItem.cxx +++ b/src/genericgui/SceneBlocItem.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2006-2015 CEA/DEN, EDF R&D +// Copyright (C) 2006-2022 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -33,6 +33,8 @@ #include +#include // for Localizer + #include "Resource.hxx" //#define _DEVDEBUG_ @@ -70,7 +72,6 @@ void SceneBlocItem::arrangeChildNodes() clock_t start_t, end_t; start_t = clock(); #endif //_DEVDEBUG_ - GVC_t* aGvc = 0; SubjectComposedNode *scnode = dynamic_cast(getSubject()); @@ -80,14 +81,11 @@ void SceneBlocItem::arrangeChildNodes() // ---- Create a graphviz context - if(!aGvc) - { - DEBTRACE(setlocale(LC_ALL,NULL)); - //Graphviz is sensitive to locale : set the mimimal one ("C")for numeric - setlocale(LC_NUMERIC, "C"); - //aginit(); - aGvc = gvContext(); - } + // Graphviz is sensitive to locale : set the mimimal one ("C")for numeric + Qtx::Localizer loc; + + //aginit(); + GVC_t* aGvc = gvContext(); // ---- Create a graph @@ -203,15 +201,15 @@ void SceneBlocItem::getNodesInfo(YACS::ENGINE::ComposedNode *cnode) width = QString(_format.c_str()).arg(lw, 0, 'g', 3); DEBTRACE(agnameof(aNode) << " (" << nh << "," << nw << ") = (" << height.toStdString() << " ; " << width.toStdString() <<")"); - agset(aNode, const_cast("height"), height.toAscii().data()); - agset(aNode, const_cast("width"), width.toAscii().data()); + agset(aNode, const_cast("height"), height.toLatin1().data()); + agset(aNode, const_cast("width"), width.toLatin1().data()); agset(aNode, const_cast("shape"), const_cast("box") ); agset(aNode, const_cast("fixedsize"), const_cast("true") ); } // --- Create edges (i.e. links) - Agnode_t* aNode; + Agnode_t* aNode = NULL; for (aNode = agfstnode(_graph); aNode; aNode = agnxtnode(_graph, aNode)) { string aNodeName = agnameof(aNode);