X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FwxVtkSceneManager.cxx;h=ca8d541dcb63085981ecc1708557ecbb9487488d;hb=e12e7f1b6c5a32373366ffe4172e5ddcd1a05209;hp=387924595fad242bf42b9a9a4ff340acb434dbd8;hpb=06bcddb8e6657b112895c5a0a4679f63d6e6865e;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index 3879245..ca8d541 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -1874,6 +1874,7 @@ void wxVtkSceneManager::getCleanLine(stringstream &inputStream, std::string &lin //========================================================================= void wxVtkSceneManager::loadDiagram(stringstream &inputStream) { + int size; std::string version = ""; std::string line = ""; @@ -2016,6 +2017,7 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream) } + //----------------------- //- COMPLEX OUTPUT PORTS //----------------------- @@ -2145,6 +2147,7 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream) result = strtok(NULL, delims);//name std::string name(result); + getCleanLine(inputStream, line);//ISEXEC:TRUE|FALSE char exec[15]; strcpy(exec, line.c_str()); @@ -2276,6 +2279,7 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream) result = strtok(NULL, delims); std::string nameEndPort(result); + int idCon = configGConnetion(nameStartBox, nameStartPort,nameEndBox, nameEndPort); if (version != "1.0") { @@ -2352,7 +2356,8 @@ GBoxModel* wxVtkSceneManager::findGBox(std::string boxname) for (j = 0; j < (int) lstB.size(); j++) { idB = lstB[j]; bMod = (GBoxModel*) _controllers[idB]->getModel(); - if (_controllers[idB]->getModel()->getBBTKName() == boxname) { + if (_controllers[idB]->getModel()->getBBTKName() == boxname) + { boxModel = bMod; } } // for @@ -2364,7 +2369,8 @@ GBoxModel* wxVtkSceneManager::findGBox(std::string boxname) for (j = 0; j < (int) lstInputs.size(); j++) { idB = lstInputs[j]; bMod = (GBoxModel*) _controllers[idB]->getModel(); - if (_controllers[idB]->getModel()->getBBTKName() == boxname) { + if (_controllers[idB]->getModel()->getBBTKName() == boxname) + { boxModel = bMod; } } // for @@ -2375,7 +2381,8 @@ GBoxModel* wxVtkSceneManager::findGBox(std::string boxname) for (j = 0; j < (int) lstOutputs.size(); j++) { int idB = lstOutputs[j]; bMod = (GBoxModel*) _controllers[idB]->getModel(); - if (_controllers[idB]->getModel()->getBBTKName() == boxname) { + if (_controllers[idB]->getModel()->getBBTKName() == boxname) + { boxModel = bMod; } } // for @@ -2405,7 +2412,7 @@ int wxVtkSceneManager::configGConnetion(std::string nameStartBox, if (boxModel != NULL) { startP = boxModel->getOutputPort(nameStartPort); if(startP == NULL){ - printf("SCP: ERROR in wxVtkSceneManager::configGConnetion start port %s is null. Port name is probably wrong.\n", nameStartPort.c_str()); + printf("SCP: ERROR in wxVtkSceneManager::configGConnetion start port is null. Port name is probably wrong. Start>%s::%s End>%s::%s\n", nameStartBox.c_str(), nameStartPort.c_str(), nameEndBox.c_str(), nameEndPort.c_str() ); } } @@ -2417,7 +2424,7 @@ int wxVtkSceneManager::configGConnetion(std::string nameStartBox, if (boxModel != NULL) { endP = boxModel->getInputPort(nameEndPort); if(endP == NULL){ - printf("SCP: ERROR in wxVtkSceneManager::configGConnetion end port %s is null. Port name is probably wrong\n", nameStartPort.c_str(), nameEndPort.c_str()); + printf("SCP: ERROR in wxVtkSceneManager::configGConnetion end port is null. Port name is probably wrong. Start>%s::%s End>%s::%s \n", nameStartBox.c_str(), nameStartPort.c_str(), nameEndBox.c_str(), nameEndPort.c_str()); } }