Ignore:
Timestamp:
Mar 19, 2013, 9:43:12 PM (11 years ago)
Author:
chronos
Message:
  • Opraveno: Načítání stavu účtu na českých Windows s desetinnou čárkou.
  • Opraveno: Automatický výběr aktivního účtu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r15 r16  
    8585begin
    8686  Core.SelectedAccountIndex := ComboBoxAccounts.ItemIndex;
    87   if ComboBoxAccounts.ItemIndex <> -1 then
    88     Core.CurrentAccount := TAccount(Core.Accounts[ComboBoxAccounts.ItemIndex])
    89     else Core.CurrentAccount := nil;
    9087  LoadInterface;
    9188end;
     
    143140  Core.Accounts.LoadToStrings(ComboBoxAccounts.Items);
    144141  if (Core.SelectedAccountIndex >= 0) and
    145     (Core.SelectedAccountIndex < ComboBoxAccounts.Items.Count) then
     142    (Core.SelectedAccountIndex < ComboBoxAccounts.Items.Count) then begin
    146143    ComboBoxAccounts.ItemIndex := Core.SelectedAccountIndex;
     144  end;
     145  if (ComboBoxAccounts.Items.Count > 0) and (ComboBoxAccounts.ItemIndex = -1) then
     146    ComboBoxAccounts.ItemIndex := 0;
     147  if ComboBoxAccounts.ItemIndex <> -1 then
     148    Core.CurrentAccount := TAccount(Core.Accounts[ComboBoxAccounts.ItemIndex])
     149    else Core.CurrentAccount := nil;
    147150  DateEditStart.Date := Core.ReportTimeFrom;
    148151  DateEditTo.Date := Core.ReportTimeTo;
     
    153156  ButtonMonthly.Enabled := Assigned(Core.CurrentAccount);
    154157  ButtonNew.Enabled := Assigned(Core.CurrentAccount);
     158  ButtonGetState.Enabled := Assigned(Core.CurrentAccount);
    155159  Core.ADownloadInterval.Enabled := Assigned(Core.CurrentAccount);
    156160  Core.ADownloadMonthly.Enabled := Assigned(Core.CurrentAccount);
Note: See TracChangeset for help on using the changeset viewer.