Skip to content

Commit

Permalink
222 - don't display dx station's Entity string when same as users. (#223
Browse files Browse the repository at this point in the history
)

Fix #222.
  • Loading branch information
w7sst committed Jan 20, 2024
2 parents f64dbfa + 6769444 commit a0dfaba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CWSST.pas
Expand Up @@ -296,7 +296,8 @@ function TCWSST.GetStationInfo(const ACallsign: string) : string;
// return userText. If empty, return DXCC Continent/Entity info.
userText := cwopsrec.UserText;
if userText.IsEmpty and
gDXCCList.FindRec(dxrec, ACallsign) then
gDXCCList.FindRec(dxrec, ACallsign) and
(dxrec.Entity <> Me.MyEntity) then
userText := dxRec.Continent + '/' + dxRec.Entity;

if not userText.IsEmpty then
Expand Down
12 changes: 11 additions & 1 deletion MyStn.pas
Expand Up @@ -17,6 +17,7 @@ TMyStation = class(TStation)
procedure AddToPieces(AMsg: string);
procedure SendNextPiece;
public
MyEntity : String;
constructor CreateStation;
destructor Destroy; override;
procedure Init;
Expand All @@ -32,7 +33,7 @@ TMyStation = class(TStation)
implementation

uses
SysUtils, RndFunc, Ini, MorseKey, Contest, Main;
SysUtils, RndFunc, Ini, MorseKey, Contest, Main, ARRL;

{ TMyStation }

Expand All @@ -52,9 +53,13 @@ destructor TMyStation.Destroy;


procedure TMyStation.Init;
var
dxrec : TDXCCRec;
begin
inherited Init;

dxrec := nil;

MyCall := Ini.Call;
NR := 1;
RST := 599;
Expand All @@ -71,6 +76,11 @@ procedure TMyStation.Init;
OpName := HamName;
Exch1 := '3A';
Exch2 := 'OR';

// load my Entity string; used to filter user-text status messages
MyEntity := '';
if gDXCCList.FindRec(dxrec, MyCall) then
MyEntity := dxrec.Entity;
end;


Expand Down

0 comments on commit a0dfaba

Please sign in to comment.