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

Private GIT Repository
added context to dispatcher op.
[blast.git] / GroupItem.cpp
index 3286c14a9ae5e9d74863cab1c4f6e92ea7e05d40..ebef87ca47501f5b8d3bc6d3bae616bbcbdc5844 100644 (file)
@@ -384,7 +384,7 @@ void GroupItem::mousePressEvent(QGraphicsSceneMouseEvent *event) {
 
   int mode = getScene()->getEditionMode();
 
 
   int mode = getScene()->getEditionMode();
 
-  dispatcher->setCurrentGroupWidget(getScene()->getGroupWidget());
+  dispatcher->setCurrentGroupWidget(Dispatcher::Design, getScene()->getGroupWidget());
 
   if ((mode == GroupScene::AddConnection) && (params->cursorState == Parameters::CursorOnInterface)) {
     InterfaceItem *inter = getInterfaceItemFromCursor(x,y);
 
   if ((mode == GroupScene::AddConnection) && (params->cursorState == Parameters::CursorOnInterface)) {
     InterfaceItem *inter = getInterfaceItemFromCursor(x,y);
@@ -448,7 +448,7 @@ void GroupItem::mouseReleaseEvent(QGraphicsSceneMouseEvent  *event) {
     else if (params->editState == Parameters::EditCloseConnection) {
       InterfaceItem* iface1 = getScene()->getSelectedInterface(1);
       InterfaceItem* iface2 = getScene()->getSelectedInterface(2);      
     else if (params->editState == Parameters::EditCloseConnection) {
       InterfaceItem* iface1 = getScene()->getSelectedInterface(1);
       InterfaceItem* iface2 = getScene()->getSelectedInterface(2);      
-      bool ok = dispatcher->createConnection(iface1,iface2);     
+      bool ok = dispatcher->createConnection(Dispatcher::Design, iface1,iface2);
       if (ok) {
         iface1->selected = false;
         update(iface1->boundingRect());
       if (ok) {
         iface1->selected = false;
         update(iface1->boundingRect());
@@ -585,15 +585,15 @@ void GroupItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) {
 
   if(selectedAction == renameAction){
     if(ifaceItem != NULL)
 
   if(selectedAction == renameAction){
     if(ifaceItem != NULL)
-      dispatcher->renameInterface(ifaceItem);
+      dispatcher->renameInterface(Dispatcher::Design, ifaceItem);
     else
     else
-      dispatcher->renameGroupBlock(this);
+      dispatcher->renameGroupBlock(Dispatcher::Design, this);
   }
   else if(selectedAction == showProperties){
   }
   else if(selectedAction == showProperties){
-    dispatcher->showProperties(ifaceItem);
+    dispatcher->showProperties(Dispatcher::Design, ifaceItem);
   }  
   else if (selectedAction == removeAction) {
   }  
   else if (selectedAction == removeAction) {
-    dispatcher->removeGroupInterface(ifaceItem);
+    dispatcher->removeGroupInterface(Dispatcher::Design, ifaceItem);
   }
   else if(selectedAction == showParameters) {
     new ParametersWindow(refBlock, params, NULL);
   }
   else if(selectedAction == showParameters) {
     new ParametersWindow(refBlock, params, NULL);