yypsybs
2023-09-09 3cb5a54def670d97301f07170fcaad213bfc54f2
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
Quintiq file version 2.0
#parent: #root
Method ExpandSelectionInNavPanel (
  shadow[SCVPISPIPNode] node,
  Boolean isfocused
) id:Method_FormSupplyChainVisualization_ExpandSelectionInNavPanel
{
  #keys: '[132894.0.999795869]'
  Body:
  [*
    // Select Product and Stocking point of this node in nav panel
    pisp := node.ProductInStockingPointInPeriod().ProductInStockingPoint_MP();
    products := construct( Product_MPs );
    sps := construct( StockingPoint_MPs );
    
    products.Add( pisp.Product_MP() );
    sps.Add( pisp.StockingPoint_MP() );
    
    // If we focus on a node / double click, clear all selections except the focused
    if( isfocused )
    {
      DataHolderUnits.Data().Flush();
      DataHolderStockingPoints.Data().Flush();
      DataHolderFocusedPISPIP.Data().Flush();
                                                        
      DataHolderFocusedPISPIP.Data().Add( node.ProductInStockingPointInPeriod() );
      
      ValueHolderSetDataHolderSelectedPISPIPExtractor.Data( false );
    }
    else
    {
      products := products.Union( DataHolderProducts.Data() );
      sps := sps.Union( DataHolderStockingPoints.Data() );
    }
    
    DataHolderProducts.Data( products.Copy() );
    DataHolderStockingPoints.Data( sps.Copy() );
  *]
}