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 ); 
 | 
  *] 
 | 
} 
 |