Quintiq file version 2.0
#parent: #root
Method EnableDisableMetaOptimizer (
  Boolean ismeta,
  Boolean overridefirst,
  Boolean overridelast,
  Boolean iscollapse
) id:Method_DialogCreateEditStrategy_EnableDisableMetaOptimizer
{
  #keys: '[151892.1.2082044721]'
  Body:
  [*
    // Enable or disable MetaOptimizer settings
     
    CheckboxOverrideFirstFocusLevel.Enabled( ismeta, "" ); 
    CheckboxOverrideLastFocusLevel.Enabled( ismeta, "" ); 
    EditFieldMetaFirstFocusLevel.Enabled( ismeta and overridefirst, "" ); 
    
    CheckboxRunFullPlanOptimization.Enabled( ismeta and overridefirst, "" ); 
    EditFieldMetaLastFocusLevel.Enabled( ismeta and overridelast, "" ); 
    EditFieldMaxiTimeForAllIteration.Enabled( ismeta,"" );
    
    if ( ismeta and guard( [Number] EditFieldMaxiTimeForAllIteration.Text() = 0, false ) ) 
    {
      EditFieldMaxiTimeForAllIteration.Text( '999999999' ); // set to large number to avoid confusion
    }
    CheckboxMetaCollapseLevel.Enabled( ismeta, "" ); 
    EditFieldMetaCollapseLevel.Enabled( ismeta and iscollapse, "" );
  *]
}
