From 5d8eb5b379cf17802c04862f02712281bd946863 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 ea695b89c..fa68ae5ee 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