From: mkr Date: Thu, 10 Aug 2006 11:33:51 +0000 (+0000) Subject: Fix for bug PAL13135 : Bug in SUPERVGUI_Service::addFactoryNode with same interface... X-Git-Tag: For_OCT_611~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2af3ba3bb4886cb82b8485ca3de973e964c872a3;p=modules%2Fsuperv.git Fix for bug PAL13135 : Bug in SUPERVGUI_Service::addFactoryNode with same interface + service. --- diff --git a/src/SUPERVGUI/SUPERVGUI.cxx b/src/SUPERVGUI/SUPERVGUI.cxx index b432b2c..c3c5764 100644 --- a/src/SUPERVGUI/SUPERVGUI.cxx +++ b/src/SUPERVGUI/SUPERVGUI.cxx @@ -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())); } } } diff --git a/src/SUPERVGUI/SUPERVGUI_Service.cxx b/src/SUPERVGUI/SUPERVGUI_Service.cxx index 7a42fb6..5fc07f4 100644 --- a/src/SUPERVGUI/SUPERVGUI_Service.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Service.cxx @@ -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) {