From: vsv Date: Tue, 7 Jun 2016 09:31:09 +0000 (+0300) Subject: Merge branch 'BR_internationalization' X-Git-Tag: V_2.4.0~139 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a8cfbfb436c27ff96edd5c808e9a452c35cef207;p=modules%2Fshaper.git Merge branch 'BR_internationalization' Conflicts: src/Model/Model_SelectionNaming.cpp src/ModuleBase/ModuleBase_Tools.cpp --- a8cfbfb436c27ff96edd5c808e9a452c35cef207 diff --cc src/FeaturesPlugin/FeaturesPlugin_Validators.cpp index c2f90be01,73c132e0d..2ab3adbb0 --- a/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_Validators.cpp @@@ -12,11 -12,8 +12,9 @@@ #include #include #include +#include #include - #include - #include #include #include diff --cc src/Model/Model_SelectionNaming.cpp index 7db813549,232834edc..c577080b1 --- a/src/Model/Model_SelectionNaming.cpp +++ b/src/Model/Model_SelectionNaming.cpp @@@ -261,45 -261,32 +261,45 @@@ std::string Model_SelectionNaming::nami TopAbs_ShapeEnum translateType (const std::string& theType) { // map from the textual shape types to OCCT enumeration - static std::map MyShapeTypes; - if (MyShapeTypes.size() == 0) { - MyShapeTypes["face"] = TopAbs_FACE; - MyShapeTypes["faces"] = TopAbs_FACE; - MyShapeTypes["vertex"] = TopAbs_VERTEX; - MyShapeTypes["vertices"] = TopAbs_VERTEX; - MyShapeTypes["wire"] = TopAbs_WIRE; - MyShapeTypes["edge"] = TopAbs_EDGE; - MyShapeTypes["edges"] = TopAbs_EDGE; - MyShapeTypes["shell"] = TopAbs_SHELL; - MyShapeTypes["solid"] = TopAbs_SOLID; - MyShapeTypes["solids"] = TopAbs_SOLID; - MyShapeTypes["FACE"] = TopAbs_FACE; - MyShapeTypes["FACES"] = TopAbs_FACE; - MyShapeTypes["VERTEX"] = TopAbs_VERTEX; - MyShapeTypes["VERTICES"] = TopAbs_VERTEX; - MyShapeTypes["WIRE"] = TopAbs_WIRE; - MyShapeTypes["EDGE"] = TopAbs_EDGE; - MyShapeTypes["EDGES"] = TopAbs_EDGE; - MyShapeTypes["SHELL"] = TopAbs_SHELL; - MyShapeTypes["SOLID"] = TopAbs_SOLID; - MyShapeTypes["SOLIDS"] = TopAbs_SOLID; + static std::map aShapeTypes; + + if(aShapeTypes.size() == 0) { + aShapeTypes["compound"] = TopAbs_COMPOUND; + aShapeTypes["compounds"] = TopAbs_COMPOUND; + aShapeTypes["compsolid"] = TopAbs_COMPSOLID; + aShapeTypes["compsolids"] = TopAbs_COMPSOLID; + aShapeTypes["solid"] = TopAbs_SOLID; + aShapeTypes["solids"] = TopAbs_SOLID; + aShapeTypes["shell"] = TopAbs_SHELL; + aShapeTypes["shells"] = TopAbs_SHELL; + aShapeTypes["face"] = TopAbs_FACE; + aShapeTypes["faces"] = TopAbs_FACE; + aShapeTypes["wire"] = TopAbs_WIRE; + aShapeTypes["wires"] = TopAbs_WIRE; + aShapeTypes["edge"] = TopAbs_EDGE; + aShapeTypes["edges"] = TopAbs_EDGE; + aShapeTypes["vertex"] = TopAbs_VERTEX; + aShapeTypes["vertices"] = TopAbs_VERTEX; + aShapeTypes["COMPOUND"] = TopAbs_COMPOUND; + aShapeTypes["COMPOUNDS"] = TopAbs_COMPOUND; + aShapeTypes["COMPSOLID"] = TopAbs_COMPSOLID; + aShapeTypes["COMPSOLIDS"] = TopAbs_COMPSOLID; + aShapeTypes["SOLID"] = TopAbs_SOLID; + aShapeTypes["SOLIDS"] = TopAbs_SOLID; + aShapeTypes["SHELL"] = TopAbs_SHELL; + aShapeTypes["SHELLS"] = TopAbs_SHELL; + aShapeTypes["FACE"] = TopAbs_FACE; + aShapeTypes["FACES"] = TopAbs_FACE; + aShapeTypes["WIRE"] = TopAbs_WIRE; + aShapeTypes["WIRES"] = TopAbs_WIRE; + aShapeTypes["EDGE"] = TopAbs_EDGE; + aShapeTypes["EDGES"] = TopAbs_EDGE; + aShapeTypes["VERTEX"] = TopAbs_VERTEX; + aShapeTypes["VERTICES"] = TopAbs_VERTEX; } - if (MyShapeTypes.find(theType) != MyShapeTypes.end()) - return MyShapeTypes[theType]; + if (aShapeTypes.find(theType) != aShapeTypes.end()) + return aShapeTypes[theType]; - Events_Error::send("Shape type defined in XML is not implemented!"); + Events_InfoMessage("Model_SelectionNaming", "Shape type defined in XML is not implemented!").send(); return TopAbs_SHAPE; } diff --cc src/ModuleBase/ModuleBase_Tools.cpp index d9114ea82,a17f61e4b..a4890633a --- a/src/ModuleBase/ModuleBase_Tools.cpp +++ b/src/ModuleBase/ModuleBase_Tools.cpp @@@ -35,8 -34,7 +35,8 @@@ #include #include + #include +#include - #include #include @@@ -511,29 -306,24 +511,29 @@@ static ShapeTypes myShapeTypes TopAbs_ShapeEnum shapeType(const QString& theType) { - if (MyShapeTypes.count() == 0) { - MyShapeTypes["face"] = TopAbs_FACE; - MyShapeTypes["faces"] = TopAbs_FACE; - MyShapeTypes["vertex"] = TopAbs_VERTEX; - MyShapeTypes["vertices"] = TopAbs_VERTEX; - MyShapeTypes["wire"] = TopAbs_WIRE; - MyShapeTypes["wires"] = TopAbs_WIRE; - MyShapeTypes["edge"] = TopAbs_EDGE; - MyShapeTypes["edges"] = TopAbs_EDGE; - MyShapeTypes["shell"] = TopAbs_SHELL; - MyShapeTypes["solid"] = TopAbs_SOLID; - MyShapeTypes["solids"] = TopAbs_SOLID; - MyShapeTypes["objects"] = TopAbs_SHAPE; + if (myShapeTypes.count() == 0) { + myShapeTypes["compound"] = TopAbs_COMPOUND; + myShapeTypes["compounds"] = TopAbs_COMPOUND; + myShapeTypes["compsolid"] = TopAbs_COMPSOLID; + myShapeTypes["compsolids"] = TopAbs_COMPSOLID; + myShapeTypes["solid"] = TopAbs_SOLID; + myShapeTypes["solids"] = TopAbs_SOLID; + myShapeTypes["shell"] = TopAbs_SHELL; + myShapeTypes["shells"] = TopAbs_SHELL; + myShapeTypes["face"] = TopAbs_FACE; + myShapeTypes["faces"] = TopAbs_FACE; + myShapeTypes["wire"] = TopAbs_WIRE; + myShapeTypes["wires"] = TopAbs_WIRE; + myShapeTypes["edge"] = TopAbs_EDGE; + myShapeTypes["edges"] = TopAbs_EDGE; + myShapeTypes["vertex"] = TopAbs_VERTEX; + myShapeTypes["vertices"] = TopAbs_VERTEX; + myShapeTypes["objects"] = TopAbs_SHAPE; } QString aType = theType.toLower(); - if (MyShapeTypes.contains(aType)) - return MyShapeTypes[aType]; + if(myShapeTypes.contains(aType)) + return myShapeTypes[aType]; - Events_Error::send("Shape type defined in XML is not implemented!"); + Events_InfoMessage("ModuleBase_Tools", "Shape type defined in XML is not implemented!").send(); return TopAbs_SHAPE; } diff --cc src/PartSet/PartSet_OperationPrs.cpp index 403bbe300,10d475066..1f8d0c560 --- a/src/PartSet/PartSet_OperationPrs.cpp +++ b/src/PartSet/PartSet_OperationPrs.cpp @@@ -128,9 -113,10 +128,10 @@@ void PartSet_OperationPrs::Compute(cons } StdPrs_WFDeflectionShape::Add(thePresentation, aShape, aDrawer); } - + Set(aComp); if (!aReadyToDisplay) { - Events_Error::throwException("An empty AIS presentation: PartSet_OperationPrs"); + Events_InfoMessage("PartSet_OperationPrs", + "An empty AIS presentation: PartSet_OperationPrs").send(); std::shared_ptr aMsg = std::shared_ptr( new Events_Message(Events_Loop::eventByName(EVENT_EMPTY_OPERATION_PRESENTATION))); Events_Loop::loop()->send(aMsg);