]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Provide selection for dump with wide strings
authorvsv <vsv@opencascade.com>
Fri, 19 Jun 2020 08:27:02 +0000 (11:27 +0300)
committervsv <vsv@opencascade.com>
Fri, 26 Jun 2020 13:33:59 +0000 (16:33 +0300)
src/ModelHighAPI/ModelHighAPI_Dumper.cpp

index ea695b89cbaf53ffb0d1114f0f0b7d0cb8503697..fa68ae5eee0ff64810bef9f6c0a994ec6188a4f6 100644 (file)
@@ -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;
     }
   }