- const char* component = anApp->moduleName(item->parent()->parent()->text(0).latin1());
- SALOME_ModuleCatalog::Acomponent_ptr myComponent = (*aModuleCatalog)->GetComponent(component);
- if (myComponent==NULL) {
- QMessageBox::warning(aDesktop, tr("ERROR"), tr("MSG_CANT_CHOOSE_SERVICE"));
- }
- else {
- const SALOME_ModuleCatalog::Service* myService = myComponent->GetService(interface, service);
- SUPERV_CNode aNode;
- if ( myService->TypeOfNode == 0 ) { // ComputeNode
- aNode = aMain->getDataflow()->CNode(*myService);
- if (CORBA::is_nil( aNode ) ) {
- QMessageBox::warning(aDesktop, tr("ERROR"), tr("MSG_CANT_CREATE_NODE"));
- return;
- }
+ //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();
+
+ SALOME_ModuleCatalog::Acomponent_ptr myComponent = (*aModuleCatalog)->GetComponent(component);
+ if (myComponent==NULL) {
+ QMessageBox::warning(aDesktop, tr("ERROR"), tr("MSG_CANT_CHOOSE_SERVICE"));