]> AND Private Git Repository - blast.git/blobdiff - GroupWidget.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
insert/move/remove block/groups/interface done. Next to fo: loading project file
[blast.git] / GroupWidget.cpp
index 043561e28c34495b6651725286860d3375335530..2ef7cd1884766de657c2083314afef71d3df05d3 100644 (file)
@@ -95,6 +95,7 @@ void GroupWidget::focusInEvent(QFocusEvent *e) {
 void GroupWidget::closeEvent(QCloseEvent *e) {
   clearFocus();
   focusNextChild();
+
 }
 
 
@@ -222,16 +223,8 @@ void GroupWidget::updateBlockButton() {
 
 void GroupWidget::slotNewEmptyGroup() {
 
-  // creating the GroupBlock in graph model
-  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);
+  dispatcher->addNewEmptyGroup(scene);
 
-  GroupWidget* child = dispatcher->createChildScene(this,newItem);
-  child->show();
 }
 
 void GroupWidget::slotNewGroup()