陈清红
2025-04-14 880f3c0257eeb8c37761d484258fdd102a369a19
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Quintiq file version 2.0
#parent: #root
Method MoveAfter (LibOpt_UIGraphNode node, LibOpt_UIGraphNode after, Boolean reposition_children)
{
  TextBody:
  [*
    if( after <> node
        and ( isnull( after ) or after <> node.Previous() )
        and ( not isnull( after ) or not isnull( node.Previous() ) ) )
    {
      if( isnull( node ) )
      {
        node.UIGraphRow().MoveFirst( node );
      }
      else
      {
        node.UIGraphRow().MoveAfter( node, after );
      }
      
      // Set column
      traverse( node, UIGraphRow.UIGraphNode, n )
      {
        n.Column( guard( n.Previous().Column() + 1, 0 ) );
      }
      
      // Reset arcs
      traverse( this, UIGraphNode.Incoming.UIGraphArcPoint, p )
      {
        p.X( 0 );
        p.Y( 0 );
        if( not isnull( p.Next() ) and not isnull( p.Previous() ) )
        {
          p.Delete();
        }
      }
      
      traverse( this, UIGraphNode, n )
      {
        n.RelativelyPositionOutgoingArcs();
      }
      
      if( reposition_children )
      {
        rows := selectsortedset( this, UIGraphRow, row, row.RowNr() > node.UIGraphRow().RowNr(), row.RowNr() );
        traverse( rows, Elements, row )
        {
          row.SortTopDown();
        }
      }
      
      this.DrawAfterSequence();
    }
  *]
  InterfaceProperties { Accessibility: 'Module' }
}