Quintiq file version 2.0
#parent: Toolbar/ButtonApply
Response OnClick () id:Response_Toolbar_ButtonApply_OnClick
{
  #keys: '[11660.0.587360435]'
  Body:
  [*
    // Apply changes
    
    data := Dialog.Data();
    
    Dialog.ApplyChanges();
    
    if( isnull( DataHolderUnitNode.Data() ) )
    {
      data.SupplyChainBackground( LabelSupplyChainBackgroundString.Text() );
    }
    else
    {
      // This will be multi-transaction and is a conscious decision
      DataHolderUnitNode.Data().BackgroundImageName( LabelUnitBackgroundString.Text() );
    }
    ApplicationLibMacroPlanner.SetSupplyChainOverviewWarning();
    
    data.Commit();
  *]
  DefinitionID: 'Responsedef_GUIButtonBase_OnClick'
  Precondition:
  [*
    return SupplyChainView::ValidateInput( feedback,
                                           EditorFontName.Text(),
                                           ApplicationLibMacroPlanner.FormatStringToNumber( EditorFontSize.Text() ),
                                           ApplicationLibMacroPlanner.FormatStringToNumber( EditorGridPointDistance.Text() ),
                                           ApplicationLibMacroPlanner.FormatStringToReal( EditorRelativeStockingPointSize.Text() ),
                                           ApplicationLibMacroPlanner.FormatStringToReal( EditorRelativeUnitHeight.Text() ),
                                           ApplicationLibMacroPlanner.FormatStringToReal( EditorRelativeUnitWidth.Text() ),
                                           ApplicationLibMacroPlanner.FormatStringToReal( EditorRelativeProductHeight.Text() ),
                                           ApplicationLibMacroPlanner.FormatStringToReal( EditorRelativeProductWidth.Text() ),
                                           ApplicationLibMacroPlanner.FormatStringToNumber( EditorOffsetX.Text() ),
                                           ApplicationLibMacroPlanner.FormatStringToNumber( EditorOffsetY.Text() ) );
  *]
}
