Merge pull request #470 from OH1KH/myloc_grayline

Fix for Grayline map
This commit is contained in:
Petr Hlozek 2022-01-03 07:34:50 +01:00 committed by GitHub
commit 34a3e1b0dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 1 deletions

View File

@ -564,7 +564,7 @@ var
lat1,long1 : Currency;
my_loc : String;
begin
my_loc := cqrini.ReadString('Station','LOC','JO70GG');
my_loc := frmNewQSO.CurrentMyLoc; //cqrini.ReadString('Station','LOC','JO70GG');
if (s='') or (d='') then
dmUtils.GetCoordinate(pfx,lat1,long1)
else begin

View File

@ -5841,6 +5841,7 @@ begin
sbNewQSO.Panels[0].Text := cMyLoc + CurrentMyLoc;
// We don't want the temporary locator to be saved permanently
// cqrini.WriteString('Station','LOC',edtLocator.Text)
ClearGrayLineMapLine; //set myqth position to new locator
end;
finally
Free;

View File

@ -400,6 +400,7 @@ object frmPreferences: TfrmPreferences
Top = 107
Width = 128
OnChange = edtLocChange
OnExit = edtLocExit
TabOrder = 3
end
end

View File

@ -1097,6 +1097,7 @@ type
procedure edtImgFilesExit(Sender: TObject);
procedure edtK3NGSerSpeedChange(Sender: TObject);
procedure edtLocChange(Sender: TObject);
procedure edtLocExit(Sender: TObject);
procedure edtPdfFilesExit(Sender: TObject);
procedure edtRecetQSOsKeyPress(Sender: TObject; var Key: char);
procedure RotorParamsChange(Sender: TObject);
@ -2603,6 +2604,22 @@ begin
edtLoc.SelStart := Length(edtLoc.Text);
end;
procedure TfrmPreferences.edtLocExit(Sender: TObject);
begin
edtLoc.Text:=trim(edtLoc.Text);
if dmUtils.IsLocOK(edtLoc.Text) then //update
begin
frmNewQSO.CurrentMyLoc :=edtLoc.Text;//current my_loc
frmNewQSO.sbNewQSO.Panels[0].Text := fNewQSO.cMyLoc + frmNewQSO.CurrentMyLoc; //and NewQSO panel
frmNewQSO.ClearGrayLineMapLine; //my_loc on map
end
else
begin
edtLoc.Text:='';
edtLoc.SetFocus;
end;
end;
procedure TfrmPreferences.edtRecetQSOsKeyPress(Sender: TObject; var Key: char);
begin
if not (key in ['0'..'9']) then