From 2686c44f7098cec8ff8c57a12705cd298b396a62 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 19 Jun 2020 11:27:02 +0300 Subject: [PATCH] Provide selection for dump with wide strings --- src/ModelHighAPI/ModelHighAPI_Dumper.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp index 1b6dbf470..c45ee0440 100644 --- a/src/ModelHighAPI/ModelHighAPI_Dumper.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Dumper.cpp @@ -314,8 +314,8 @@ void ModelHighAPI_Dumper::DumpStorage::write(const AttributeSelectionPtr& theAtt getShapeAndContext(theAttrSelect, aShape, aContext); if (aShape.get()) { - //TODO: vsv myDumpBuffer << "\"" << aShape->shapeTypeStr() << "\", \"" - // << theAttrSelect->namingName() << "\""; + myDumpBuffer << "\"" << aShape->shapeTypeStr() << "\", \"" + << ModelAPI_Tools::toString(theAttrSelect->namingName()) << "\""; } myDumpBuffer << ")"; @@ -495,8 +495,10 @@ void ModelHighAPI_Dumper::DumpStorageWeak::write(const AttributeSelectionPtr& th GeomAlgoAPI_NExplode aNExplode(aContext->shape(), aShape->shapeType()); int anIndex = aNExplode.index(aShape); if (anIndex != 0) { // found a week-naming index, so, export it - //TODO: vsv myDumpBuffer << "model.selection(\"" << aShape->shapeTypeStr() << "\", \"" - // << theAttrSelect->contextName(aContext) << "\", " << anIndex << ")"; + std::wstring aaa = theAttrSelect->contextName(aContext); + myDumpBuffer << "model.selection(\"" << aShape->shapeTypeStr() << "\", \"" + << ModelAPI_Tools::toString(theAttrSelect->contextName(aContext)) + << "\", " << anIndex << ")"; aStandardDump = false; } } -- 2.39.2