PoChecker: correctly update the GUI when selecting a single file through the "Open a po-file" button.

git-svn-id: trunk@46539 -
This commit is contained in:
bart 2014-10-12 14:11:12 +00:00
parent 52c0403596
commit 1a7d1eeebd

View File

@ -194,19 +194,18 @@ end;
procedure TPoCheckerForm.OpenBtnClick(Sender: TObject);
var
Fn: String;
Idx: Integer;
begin
if TrySelectFile(Fn) then
begin
if IsMasterPoName(Fn) then
AddToMasterPoList(Fn)
else
//AddToChildPoList(Fn);
AddToMasterPoList(ExtractMasterNameFromChildName(Fn));
UpdateGUI(True);
end
else
begin
UpdateGUI(False);
begin
AddToMasterPoList(Fn);
Idx := MasterPoListBox.Items.IndexOf(Fn);
if (Idx <> -1) then
MasterPoListBox.Selected[Idx] := True;
end;
UpdateGUI(MasterPoListBox.SelCount > 0);
end;
end;