Ignore:
Timestamp:
Feb 3, 2019, 11:55:30 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Load/save game syste name correctly from/to file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormGameSystems.pas

    r275 r276  
    6767  SRemoveItems = 'Remove items';
    6868  SRemoveItemsQuery = 'Do you want to remove selected items?';
    69 
     69  SNewGameSystem = 'New game system';
    7070
    7171{ TFormGameSystems }
     
    9696  with TGameSystem(ListView1.Selected.Data) do begin
    9797    TempEntry := TGameSystem.Create;
     98    TempEntry.Assign(TGameSystem(ListView1.Selected.Data));
    9899    FormGameSystem := TFormGameSystem.Create(Self);
    99100    try
     
    101102      if FormGameSystem.ShowModal = mrOk then begin
    102103        FormGameSystem.SaveData(TempEntry);
     104        TGameSystem(ListView1.Selected.Data).Assign(TempEntry);
    103105        UpdateList;
    104106        UpdateInterface;
     
    118120  FormGameSystem := TFormGameSystem.Create(Self);
    119121  try
     122    TempEntry.FileName := SNewGameSystem + GameSystemExt;
    120123    FormGameSystem.LoadData(TempEntry);
    121124    if FormGameSystem.ShowModal = mrOk then begin
    122125      FormGameSystem.SaveData(TempEntry);
     126      TGameSystem(ListView1.Selected.Data).Assign(TempEntry);
    123127      UpdateList;
    124128      UpdateInterface;
     
    165169  if Item.Index < ListView1.Items.Count then
    166170  with TGameSystem(GameSystems[Item.Index]) do begin
    167     Item.Caption := Name;
     171    Item.Caption := GetName;
    168172    Item.Data := GameSystems[Item.Index];
    169173  end;
Note: See TracChangeset for help on using the changeset viewer.