Changeset 97 for trunk/Forms/UFormImportSources.pas
- Timestamp:
- Aug 22, 2016, 1:16:56 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormImportSources.pas
r96 r97 184 184 var 185 185 NewImportSource: TImportSource; 186 I: Integer; 186 187 begin 187 188 NewImportSource := TImportSource.Create; … … 194 195 if not Assigned(ImportSources.SearchByName(NewImportSource.Name)) then begin; 195 196 ImportSources.Add(NewImportSource); 197 198 // Update reverse references 199 for I := 0 to NewImportSource.Categories.Count - 1 do 200 if TAcronymCategory(NewImportSource.Categories.Items[I]).ImportSources.IndexOf(NewImportSource) = -1 then 201 TAcronymCategory(NewImportSource.Categories.Items[I]).ImportSources.Add(NewImportSource); 202 196 203 NewImportSource := nil; 197 204 Core.AcronymDb.Modified := True; … … 228 235 var 229 236 NewImportSource: TImportSource; 237 I: Integer; 230 238 begin 231 239 if Assigned(ListView1.Selected) then begin … … 241 249 TImportSource(ListView1.Selected.Data).Assign(NewImportSource); 242 250 Core.AcronymDb.Modified := True; 243 UpdateList;244 251 end else ShowMessage(Format(SImportSourceAlreadyExists, [NewImportSource.Name])); 245 252 end else begin 246 253 TImportSource(ListView1.Selected.Data).Assign(NewImportSource); 247 254 Core.AcronymDb.Modified := True; 248 UpdateList;249 255 end; 256 257 // Update reverse references 258 TImportSource(ListView1.Selected.Data).Categories.UpdateLinkImportSources(TImportSource(ListView1.Selected.Data)); 259 260 UpdateList; 250 261 end; 251 262 if Assigned(NewImportSource) then NewImportSource.Free;
Note:
See TracChangeset
for help on using the changeset viewer.