Changeset 146 for trunk/Forms/UFormAcronyms.pas
- Timestamp:
- Jan 24, 2017, 4:34:36 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormAcronyms.pas
r123 r146 54 54 procedure UpdateAcronymsList; 55 55 public 56 FocusAcronym: TAcronymMeaning; 56 57 procedure UpdateInterface; 57 58 end; … … 110 111 111 112 procedure TFormAcronyms.FormShow(Sender: TObject); 113 var 114 I: Integer; 112 115 begin 113 116 Core.PersistentForm1.Load(Self); … … 115 118 UpdateAcronymsList; 116 119 Core.ScaleDPI1.ScaleControl(ToolBar1, Core.ScaleDPI1.DesignDPI); 120 121 // Focus line with acronym 122 if Assigned(FocusAcronym) then begin 123 I := 0; 124 while (I < ListViewAcronyms.Items.Count) and (ListViewAcronyms.Items[I].Data <> FocusAcronym) do Inc(I); 125 if I < ListViewAcronyms.Items.Count then begin 126 ListViewAcronyms.ItemIndex := I; 127 ListViewAcronyms.Selected.Focused := True; 128 end; 129 if ListViewAcronyms.Selected <> nil then 130 ListViewAcronyms.Selected.MakeVisible(False); 131 end; 117 132 end; 118 133 … … 235 250 I: Integer; 236 251 begin 252 FocusAcronym := nil; 253 MeaningCount := 0; 237 254 Core.CoolTranslator1.TranslateComponentRecursive(Self); 238 255 for I := 0 to ToolBar1.ButtonCount - 1 do
Note:
See TracChangeset
for help on using the changeset viewer.