X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/08289b4fcdfc9478089ba586c05d74222bb1b12c..d30c9cf675ad7141d1c8e31d2e72315267d45cf2:/GroupWidget.cpp diff --git a/GroupWidget.cpp b/GroupWidget.cpp index 1446a13..043561e 100644 --- a/GroupWidget.cpp +++ b/GroupWidget.cpp @@ -223,11 +223,14 @@ void GroupWidget::updateBlockButton() { void GroupWidget::slotNewEmptyGroup() { // creating the GroupBlock in graph model - GroupBlock* groupBlock = params->addGroupBlock(); - // creating the BlockItem in the inner scene - BoxItem* block = new BoxItem(groupBlock, dispatcher, params, scene->getGroupItem()); - - GroupWidget* child = dispatcher->createChildScene(this,block); + GroupBlock* parent = AB_TO_GRP(scene->getGroupItem()->getRefBlock()); + cout << "new group : parent = "<< qPrintable(parent->getName()) << endl; + GroupBlock* groupBlock = params->getGraph()->createChildBlock(parent); + cout << "new group : child = "<< qPrintable(groupBlock->getName()) << ", child of " << qPrintable(groupBlock->getParent()->getName()) << endl; + // creating the BlockItem in the scene + BoxItem* newItem = scene->createBlockItem(groupBlock); + + GroupWidget* child = dispatcher->createChildScene(this,newItem); child->show(); }