]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Because of since now, any part of a destributed MED file can have its own mesh name...
authorapo <apo@opencascade.com>
Mon, 19 Nov 2007 12:27:41 +0000 (12:27 +0000)
committerapo <apo@opencascade.com>
Mon, 19 Nov 2007 12:27:41 +0000 (12:27 +0000)
src/VISU_I/VISU_MultiResult_i.cc

index ce2d5d783ac3769debfa7db7a2ee49903d75de64..f99d8ffda706df3072300b9cc17880b698915c25 100644 (file)
@@ -284,6 +284,7 @@ namespace VISU
     if(!theIsBuild || *theIsDone)
       return;
     
+    INITMSG(MYDEBUG, "BuildParts\n");
     TTimerLog aTimerLog(MYTIMEDEBUG, "BuildParts");
     TResultManager aResultManager(theResult);
     TTransactionManager aTransactionManager(theStudy);
@@ -295,6 +296,7 @@ namespace VISU
       const VISU::PMesh& aMesh = aMeshMapIter->second;
       
       MultiResult_i::TPartNames aPartNames = aMultiprObj.getParts();
+      BEGMSG(MYDEBUG, "aPartNames.size() = "<<aPartNames.size()<<"\n");
       
       if(thePublishInStudy){
        QString aComment = "Sub-parts: #";
@@ -320,6 +322,7 @@ namespace VISU
        const MultiResult_i::TPartName& aPartName = aPartNames[aPartID];
        MultiResult_i::TPartName aMainPart = ExtractMainPart(aPartName);
        aMainPart2SubPartNames[aMainPart].insert(aPartName);
+       BEGMSG(MYDEBUG, "aMainPart2SubPartNames['"<<aMainPart<<"'].insert('"<<aPartName<<"')\n");
       }
       
       for (size_t aPartID = 0 ; aPartID < aPartNames.size() ; aPartID++) {
@@ -330,6 +333,7 @@ namespace VISU
        aPartInfos[aFileInfo.fileName()] = aPartInfo;
        
        aPartName2FileName[aPartInfo.myName] = aPartInfo.myFileName;
+       BEGMSG(MYDEBUG, "aPartName2FileName['"<<aPartInfo.myName<<"'] = '"<<aPartInfo.myFileName<<"'\n");
        
        if(!thePublishInStudy)
          continue;
@@ -351,6 +355,7 @@ namespace VISU
                           aComment.latin1(),
                           true);
          aPartName2Resolution[aPartInfo.myName] = aResolution;
+         BEGMSG(MYDEBUG, "aPartName2Resolution['"<<aPartInfo.myName<<"'] = '"<<aResoltutionsString<<"'\n");
        }
       }
       
@@ -827,7 +832,7 @@ VISU::MultiResult_i
       continue;
 
     MultiResult_i::TPartInfo aPartInfo = GetPartInfo(myMultiprObj, aPartName);
-    if(aPartInfo.myMeshName == theMeshName)
+    if(true || aPartInfo.myMeshName == theMeshName) // To ignore theMeshName input parameter
       aMeshParts.push_back(aPartName);
   }
 
@@ -860,7 +865,7 @@ VISU::MultiResult_i
       continue;
 
     MultiResult_i::TPartInfo aPartInfo = GetPartInfo(myMultiprObj, aPartName);
-    if(aPartInfo.myMeshName != theMeshName)
+    if(false || aPartInfo.myMeshName != theMeshName) // To ignore theMeshName input parameter
       continue;
 
     MultiResult_i::TResolutions aResolutions = VISU::GetResolutions(myMainPart2SubPartNames, thePartName);
@@ -919,11 +924,11 @@ VISU::MultiResult_i
 
   VISU::Storable::TRestoringMap aRestoringMap;
   aRestoringMap["myComment"] = "PART";
-  aRestoringMap["myMeshName"] = theMeshName;
+  //aRestoringMap["myMeshName"] = theMeshName; // To ignore theMeshName input parameter
   aRestoringMap["myName"] = thePartName;
 
   const VISU::TMeshMap& aMeshMap = Result_i::GetInput()->GetMeshMap();
-  //VISU::TMeshMap::const_iterator aMeshIter = aMeshMap.find(theMeshName);
+  //VISU::TMeshMap::const_iterator aMeshIter = aMeshMap.find(theMeshName); // To ignore theMeshName input parameter
   VISU::TMeshMap::const_iterator aMeshIter = aMeshMap.begin();
   if(aMeshIter == aMeshMap.end())
     return;
@@ -937,6 +942,9 @@ VISU::MultiResult_i
   else
     aFatherEntry = Result_i::GetEntry(aRestoringMap);
   
+  if ( aFatherEntry == "" )
+    return;
+
   std::string anIconName = "ICON_MULTIPR_VIEW_HIDE";
   if(theResolution == VISU::Result::FULL)
     anIconName = "ICON_MULTIPR_VIEW_FULL";