From: vsr Date: Wed, 12 Feb 2020 13:22:23 +0000 (+0300) Subject: Fix problems with localization: prevent accidental breaking of application locale X-Git-Tag: V9_5_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Frnv%2Fpv58_2;p=modules%2Fyacs.git Fix problems with localization: prevent accidental breaking of application locale --- diff --git a/src/genericgui/SceneBlocItem.cxx b/src/genericgui/SceneBlocItem.cxx index b455f2c0e..39f6c15cd 100644 --- a/src/genericgui/SceneBlocItem.cxx +++ b/src/genericgui/SceneBlocItem.cxx @@ -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