From: san Date: Mon, 18 Jul 2005 12:02:11 +0000 (+0000) Subject: Fix for bugs: X-Git-Tag: T2_2_5a~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=69ec128baaedc139166988e3e504767313b8690c;p=modules%2Fsuperv.git Fix for bugs: 1) PAL9510 (SIGSEGV appears after trying to add an empty InLine node: modifications in addInlineNode() function), 2) PAL9512 (Incorrect default view of the "Add Node" dlg: modifications in initialise() function). --- diff --git a/src/SUPERVGUI/SUPERVGUI_Service.cxx b/src/SUPERVGUI/SUPERVGUI_Service.cxx index b798d25..16d897e 100644 --- a/src/SUPERVGUI/SUPERVGUI_Service.cxx +++ b/src/SUPERVGUI/SUPERVGUI_Service.cxx @@ -314,7 +314,7 @@ void SUPERVGUI_Service::initialise() { SALOME_ModuleCatalog::Service* Service = &(Interface->interfaceservicelist[k]); QListViewItem* myServiceItem = new QListViewItem(myInterfaceItem, (char*)Service->ServiceName); myServiceItem->setSelectable(true); - components->ensureItemVisible(myServiceItem); + //components->ensureItemVisible(myServiceItem); long nbPortsOut = Service->ServiceoutParameter.length(); for (int m=0; mgetDataflow()->INode(myScriptPane->getFuncName().latin1(), - (myScriptPane->getFunction()).in()); + SUPERV_CNode aNode = + aMain->getDataflow()->INode(myScriptPane->getFuncName().isEmpty() ? "" : myScriptPane->getFuncName().latin1(), + (myScriptPane->getFunction()).in()); if (CORBA::is_nil(aNode)) { QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE")); return; @@ -494,9 +495,10 @@ void SUPERVGUI_Service::addInlineNode() { case 1: // Switch { SUPERV_INode aEndNode; - SUPERV_CNode aStartNode = aMain->getDataflow()->SNode(myScriptPane->getFuncName().latin1(), - (myScriptPane->getFunction()).in(), - aEndNode); + SUPERV_CNode aStartNode = + aMain->getDataflow()->SNode(myScriptPane->getFuncName().isEmpty() ? "" : myScriptPane->getFuncName().latin1(), + (myScriptPane->getFunction()).in(), + aEndNode); if (CORBA::is_nil(aStartNode) || CORBA::is_nil(aEndNode)) { QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE")); return; @@ -508,10 +510,14 @@ void SUPERVGUI_Service::addInlineNode() { case 2: // Loop { SUPERV_INode aEndNode; - SUPERV_CNode aStartNode = aMain->getDataflow()->LNode(myInitPane->getFuncName().latin1(), (myInitPane->getFunction()).in(), - myMorePane->getFuncName().latin1(), (myMorePane->getFunction()).in(), - myNextPane->getFuncName().latin1(), (myNextPane->getFunction()).in(), - aEndNode); + SUPERV_CNode aStartNode = + aMain->getDataflow()->LNode(myInitPane->getFuncName().isEmpty() ? "" : myInitPane->getFuncName().latin1(), + (myInitPane->getFunction()).in(), + myMorePane->getFuncName().isEmpty() ? "" : myMorePane->getFuncName().latin1(), + (myMorePane->getFunction()).in(), + myNextPane->getFuncName().isEmpty() ? "" : myNextPane->getFuncName().latin1(), + (myNextPane->getFunction()).in(), + aEndNode); if (CORBA::is_nil(aStartNode) || CORBA::is_nil(aEndNode)) { QMessageBox::warning(0, tr("ERROR"), tr("MSG_CANT_CREATE_NODE")); return;