- Fixed TfrmEditAccount.RegionDeleted to check, if the region is known (to prevent index out of bounds errors)

- Fixed UfrmMain to be compatible with newer versions of FPC
- Added a slider to frmRegionControl
- Added buttons to add and delete regions to frmRegionControl
- Fixed unsaved regions not being removed in TfrmRegionControl
- Extracted TfrmRegionControl.CheckUnsaved
This commit is contained in:
2008-09-28 22:00:32 +02:00
parent 01f5b2ca58
commit e727aadcf2
6 changed files with 287 additions and 152 deletions
+5 -1
View File
@@ -143,8 +143,12 @@ begin
end;
procedure TfrmEditAccount.RegionDeleted(ARegionName: string);
var
index: Integer;
begin
cbRegions.Items.Delete(cbRegions.Items.IndexOf(ARegionName));
index := cbRegions.Items.IndexOf(ARegionName);
if index > -1 then
cbRegions.Items.Delete(index);
end;
procedure TfrmEditAccount.RegionList;