- //put the built bloc into target node
- sbloc->putInComposedNode("ForEachLoop_"+typeNode,"ForEachLoop_"+typeNode);
-}
-
-void GuiEditor::PutGraphInOptimizerLoop()
-{
- // put graph in Bloc node before
- std::string blocname = PutGraphInBloc();
-
- Proc* proc = GuiContext::getCurrent()->getProc();
- Node* bloc = proc->getChildByShortName(blocname);
- SubjectNode * sbloc = GuiContext::getCurrent()->_mapOfSubjectNode[bloc];
- //put the built bloc into target node
- sbloc->putInComposedNode("OptimizerLoop0","OptimizerLoop");
+ // create a target node
+ SubjectNode * snode = CreateNode(typeNode);
+ // put the built bloc into target node
+ sbloc->putInComposedNode(snode->getName(), typeNode);
+ // select a target node
+ YACS::HMI::SubjectProc* subproc = QtGuiContext::getQtCurrent()->getSubjectProc();
+ QtGuiContext::getQtCurrent()->setSelectedSubject(subproc);
+ arrangeNodes(false);