]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Fix for bug PAL13135 : Bug in SUPERVGUI_Service::addFactoryNode with same interface...
authormkr <mkr@opencascade.com>
Thu, 10 Aug 2006 11:33:51 +0000 (11:33 +0000)
committermkr <mkr@opencascade.com>
Thu, 10 Aug 2006 11:33:51 +0000 (11:33 +0000)
src/SUPERVGUI/SUPERVGUI.cxx
src/SUPERVGUI/SUPERVGUI_Service.cxx

index b432b2c4a8bd85f0227c5a735d868e5fc68f9dbd..c3c5764072b0335e22d7ff318767ac68ebb56ba3 100644 (file)
@@ -1051,12 +1051,8 @@ void SUPERVGUI::fillInterfaceNameMap() {
       //get component
       SALOME_ModuleCatalog::Acomponent_ptr aComponent = (*aModuleCatalog)->GetComponent(aCompList[ind1]);
       if ( aComponent != NULL ) {
-        //get interface list
-        SALOME_ModuleCatalog::ListOfInterfaces_var anIntList = aComponent->GetInterfaceList();
-        for (int ind2 = 0; ind2 < anIntList->length(); ind2++) {
-          const char* anIntName = anIntList[ind2];
-          myInterfaceNameMap.insert(QString(anIntName), QString(aComponent->componentname()));
-        }
+       // mkr : PAL13135
+       myInterfaceNameMap.insert(QString(aComponent->componentusername()), QString(aComponent->componentname()));
       }
     }
   }
index 7a42fb6676a961e60fe8b6c667ae3256ad938d12..5fc07f47a8aa9366dcf34372fe4730529d67c3bd 100644 (file)
@@ -452,8 +452,10 @@ void SUPERVGUI_Service::addFactoryNode() {
          const char* service   = item->text(0).latin1();
          const char* interface = item->parent()->text(0).latin1();
          //const char* component = anApp->moduleName(item->parent()->parent()->text(0).latin1());
-         if ( aSupMod->getInterfaceNameMap().contains(item->parent()->text(0)) ) {
-           const char* component = aSupMod->getInterfaceNameMap().find(item->parent()->text(0)).data();
+         // mkr : PAL13135 -->
+         if ( aSupMod->getInterfaceNameMap().contains(item->parent()->parent()->text(0)) ) {
+           const char* component = aSupMod->getInterfaceNameMap().find(item->parent()->parent()->text(0)).data();
+           // mkr : PAL13135 <--
 
            SALOME_ModuleCatalog::Acomponent_ptr myComponent = (*aModuleCatalog)->GetComponent(component);
            if (myComponent==NULL) {