Browse Source

Correctly refresh connections

Yentl Van Tendeloo 8 years ago
parent
commit
c0d7bbb9a8
1 changed files with 15 additions and 13 deletions
  1. 15 13
      models/CBD_mapper.mvc

+ 15 - 13
models/CBD_mapper.mvc

@@ -130,6 +130,16 @@ Composite schedule {
         }
     }
 
+    {Contains} ForAll remove_connections {
+        LHS {
+            Pre_rendered/Line {
+                label = "0"
+            }
+        }
+        RHS {
+        }
+    }
+
     {Contains} ForAll render_connections {
         LHS {
             Pre_abstract/Block pre_conn_0 {
@@ -158,17 +168,6 @@ Composite schedule {
             Pre_TracabilityLink (pre_conn_1, pre_conn_4) {
                 label = "6"
             }
-
-            constraint = $
-                Boolean function constraint(model : Element, mapping : Element):
-                    Element trace_links
-                    trace_links = allOutgoingAssociationInstances(model, mapping["2"], "TracabilityLink")
-                    if (read_nr_out(trace_links) > 0):
-                        log("Block already connected; ignoring!")
-                        return False!
-                    else:
-                        return True!
-                $
         }
         RHS {
             Post_abstract/Block post_conn_0 {
@@ -238,8 +237,11 @@ Composite schedule {
 
 Initial (schedule, render_blocks) {}
 
-OnSuccess (render_blocks, render_connections) {}
-OnFailure (render_blocks, render_connections) {}
+OnSuccess (render_blocks, remove_connections) {}
+OnFailure (render_blocks, remove_connections) {}
+
+OnSuccess (remove_connections, render_connections) {}
+OnFailure (remove_connections, render_connections) {}
 
 OnSuccess (render_connections, success) {}
 OnFailure (render_connections, success) {}