From: eduardo.davila@creatis.insa-lyon.fr Date: Fri, 26 Dec 2025 10:56:15 +0000 (+0100) Subject: Clean code X-Git-Url: http://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=ebccaa4cd65d60c64a61cf1051725ce618d8e6e8;p=bbtkGEditor.git Clean code --- diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index 9e36976..0d4578b 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -864,7 +864,8 @@ void wxVtkSceneManager::SelectConnectors() { id = _selectedObjects[iSelected]; cont = _controllers[id]; - possibleNameAA = cont->getModel()->getBBTKName(); +// possibleNameAA = cont->getModel()->getBBTKName(); + possibleNameAA = cont->getModel()->getBBTKType() +":"+cont->getModel()->getBBTKName(); std::transform( possibleNameAA.begin(),possibleNameAA.end(),possibleNameAA.begin(), ::toupper ); for (it = _controllers.begin(); it != _controllers.end(); ++it) { @@ -880,12 +881,16 @@ void wxVtkSceneManager::SelectConnectors() modelBoxStart = connectorModel->getStartPort()->getParentBox(); boxNameStart = modelBoxStart->getBBTKType() +":"+ modelBoxStart->getBBTKName(); std::transform( boxNameStart.begin(),boxNameStart.end(),boxNameStart.begin(),::toupper); - if ( (int)(boxNameStart.find(possibleNameAA)) >= 0 ) { ok= true;} +// if ( (int)(boxNameStart.find(possibleNameAA)) >= 0 ) { ok= true;} + if ( boxNameStart.compare(possibleNameAA)==0 ) { ok= true;} + //end modelBoxEnd = connectorModel->getEndPort()->getParentBox(); boxNameEnd = modelBoxEnd->getBBTKType() +":"+ modelBoxEnd->getBBTKName(); std::transform( boxNameEnd.begin(),boxNameEnd.end(),boxNameEnd.begin(),::toupper); - if ( (int)(boxNameEnd.find(possibleNameAA)) >= 0 ) { ok= true; } +// if ( (int)(boxNameEnd.find(possibleNameAA)) >= 0 ) { ok= true; } + if ( boxNameEnd.compare(possibleNameAA)==0 ) { ok= true; } + // if (ok==true) {