Skip to content

Commit

Permalink
Send SAMP selection when searching by name
Browse files Browse the repository at this point in the history
  • Loading branch information
pchev committed Jan 23, 2019
1 parent f676e2b commit 04b8de0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions skychart/cu_catalog.pas
Expand Up @@ -4113,6 +4113,14 @@ function Tcatalog.SearchNebulae(Num: string; var ar1, de1: double): boolean;
FFindRecOK := True;
FFindRec := rec;
Result := True;
if SampConnected then
begin
cfgcat.SampFindTable := vocat.SAMPid;
cfgcat.SampFindURL := vocat.SAMPurl;
cfgcat.SampFindRec := vocat.VOcatrec;
end
else
cfgcat.SampFindTable := '';
end;
until Result or (not ok);
CloseVOCat;
Expand Down
6 changes: 6 additions & 0 deletions skychart/fu_chart.pas
Expand Up @@ -2866,6 +2866,12 @@ procedure Tf_chart.IdentSearchResult(num, stype: string; itype: integer;
// show label
sc.cfgsc.FindOK := True;
ShowIdentLabel;
if SampConnected and (sc.Catalog.cfgcat.SampFindTable > '') then
begin
if assigned(FSendSelectRow) then
FSendSelectRow(sc.Catalog.cfgcat.SampFindTable, sc.Catalog.cfgcat.SampFindUrl,
IntToStr(sc.Catalog.cfgcat.SampFindRec));
end;
end
// only coordinates are available
else
Expand Down

0 comments on commit 04b8de0

Please sign in to comment.