lazhen
2025-01-07 b3987122cbbc46c5c59d3173f37fca3170b6dc5a
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
Quintiq file version 2.0
#parent: #root
Response OnClick () id:Response_ListUnitTree_MenuNewUnit_OnClick_351
{
  #keys: '[113694.2.1040956774]'
  Body:
  [*
    // Create a new root unit
    dlg := construct( DialogCreateEditUnit );
    unit := dlg.NewUnit( this, null( Unit ), GlobalParameters_MP::GetDefaultGridX(),  GlobalParameters_MP::GetDefaultGridY() );
    
    if( not isnull( unit ) )
    {
      objects := construct( Units );
      objects.Add( unit );
      ApplicationLibMacroPlanner.ExpandNavigationSelection( objects );
    }
  *]
  CanBindMultiple: false
  DefinitionID => /Responsedef_ListUnitTree_Menu_OnClick
  Initiator: 'MenuNewUnit'
  Precondition:
  [*
    return MacroPlan::HasMacroPlan( MacroPlan, feedback );
  *]
}