cf126f58c953 — Leonard Ritter a month ago
* fixed blocktree for changes in scopes
1 files changed, 7 insertions(+), 7 deletions(-)

M tukan/view/blocktree.sc
M tukan/view/blocktree.sc +7 -7
@@ 290,7 290,7 @@ typedef+ BlockTree
             ? (self.dragged_depth > 0) 4 1
 
 fn BeginBlockTree (blocktree)
-    let bt = (Rc.clone blocktree)
+    let bt = (copy blocktree)
     BlockTree.current = bt
     'begin ('force-unwrap BlockTree.current)
 

          
@@ 415,7 415,7 @@ struct DemoNode
             RcType
                 parent = parent
                 _name = name
-        'append parent.children (Rc.clone self)
+        'append parent.children (copy self)
         self
 
     fn root? (self)

          
@@ 441,7 441,7 @@ struct DemoNode
         let oldparent =
             try ('upgrade self.parent)
             else
-                return (Rc.clone self)
+                return (copy self)
         let i =
             try ('child-index oldparent self)
             else

          
@@ 454,12 454,12 @@ struct DemoNode
     case (self newparent index)
         let self = (unparent self)
         self.parent = newparent
-        'insert newparent.children (Rc.clone self) index
+        'insert newparent.children (copy self) index
         ;
     case (self newparent)
         let self = (unparent self)
         self.parent = newparent
-        'append newparent.children (Rc.clone self)
+        'append newparent.children (copy self)
         ;
 
 global root : DemoNode.RcType =

          
@@ 485,14 485,14 @@ fn perform-drop (target mode)
     returning void
     local stack : (GrowingArray DemoNode.RcType)
     local todo : (GrowingArray DemoNode.RcType)
-    'append stack (Rc.clone root)
+    'append stack (copy root)
     while (not (empty? stack))
         let node = ('pop stack)
         if node.selected
             'append todo node
         else
             for child in ('reverse node.children)
-                'append stack (Rc.clone child)
+                'append stack (copy child)
     switch mode
     case DropMode.East
         for child in todo