Changeset 237:ea5cb50ebe5e in IBBoard.WarFoundry.GUI.WinForms


Ignore:
Timestamp:
01/21/12 10:51:07 (4 months ago)
Author:
IBBoard <dev@…>
Branch:
default
Message:

Fixes #384: Validation warnings don't get cleared when creating new armies

  • Check whether army is valid when it changes (also means we validate on load as well as clearing on close)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • FrmMain.cs

    r234 r237  
    916916        { 
    917917            CommandStack.Reset(); 
     918            ValidateArmy(); 
    918919            loadedFilePath = null; 
    919920            miSaveArmy.Enabled = false; 
     
    12521253        { 
    12531254            ICollection<string> failureMessages; 
    1254             if (Validates.AsOkay(RequirementHandler.ValidateArmy(CurrentArmy, out failureMessages))) 
     1255            if (CurrentArmy == null || Validates.AsOkay(RequirementHandler.ValidateArmy(CurrentArmy, out failureMessages))) 
    12551256            { 
    12561257                sbErrorPanel.Text = ""; 
Note: See TracChangeset for help on using the changeset viewer.