X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FwxVtkSceneManager.cxx;h=e4bb7ef8b11233a3cfa956dd7b4cdb012f724d6f;hb=febe66ddb87e98b56f8bb7aa14800d7d477d34a5;hp=de910b70ab1f210a3802ba6c2da7d59cdccd81f2;hpb=e5a591a3c57a60eea71b1fb91f68162bebfefd7d;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index de910b7..e4bb7ef 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -1754,29 +1754,37 @@ void wxVtkSceneManager::getCleanLine(stringstream &inputStream, std::string &lin { getline(inputStream, line,'\n'); int size = line.length(); - if ( line[ size-1 ]==13 ) +printf(" wxVtkSceneManager::getCleanLine Start %d %s\n",size, line.c_str() ); + if (size>0) { - line.erase(size-1,1); - } + if ( line[ size-1 ]==13 ) + { + line.erase(size-1,1); + } // if line + } // if size +printf(" wxVtkSceneManager::getCleanLine End\n", line.c_str() ); } //========================================================================= - void wxVtkSceneManager::loadDiagram(stringstream &inputStream) { + printf("wxVtkSceneManager::loadDiagram Start\n"); int size; std::string version = ""; std::string line = ""; char delims[] = ":"; char *result = NULL; + printf("wxVtkSceneManager::loadDiagram 1\n"); getCleanLine(inputStream, line); + printf("wxVtkSceneManager::loadDiagram 2 %s\n",line.c_str()); bool start = false; while (!inputStream.eof()) { if (line == "" || line[0] == '#') { line=""; getCleanLine(inputStream, line); + printf("wxVtkSceneManager::loadDiagram line> %s\n",line.c_str()); if (line == "# - BBTKGEditor v 1.0 BBG BlackBox Diagram file") { version = line.substr(18, 3); @@ -2139,6 +2147,7 @@ void wxVtkSceneManager::loadDiagram(stringstream &inputStream) } // start +printf("wxVtkSceneManager::loadDiagram End\n"); } //=========================================================================