mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-21 13:05:43 -05:00
Show the identifier of auto-added talker alias radios (#2743)
Radio and P25FullyQualifiedRadio didn't set the value property when built with the value constructor, which is how TalkerAliasAutoAdder creates the radio ID for a new alias. The Identifier column in the alias view by identifier type binds to that property, so it stayed blank until the alias was edited or the playlist was reloaded through the setters. Fixes #2730
This commit is contained in:
@@ -48,6 +48,7 @@ public class P25FullyQualifiedRadio extends Radio
|
||||
super(Protocol.APCO25, id);
|
||||
mWacn = wacn;
|
||||
mSystem = system;
|
||||
updateValueProperty();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,6 +45,7 @@ public class Radio extends AliasID implements Comparable<Radio>
|
||||
{
|
||||
mProtocol = protocol;
|
||||
mValue = value;
|
||||
updateValueProperty();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -82,6 +82,7 @@ public class TalkerAliasAutoAdderTest
|
||||
assertEquals(TalkerAliasAutoAdder.ALIAS_GROUP, alias.getGroup());
|
||||
assertTrue(alias.getAliasIdentifiers().get(0) instanceof Radio radio && radio.getValue() == 1234 &&
|
||||
radio.getProtocol() == Protocol.APCO25);
|
||||
assertEquals("Radio ID:1234 Protocol:APCO-25", alias.getAliasIdentifiers().get(0).valueProperty().get());
|
||||
|
||||
decode(RADIO, "ENGINE 12");
|
||||
assertEquals(1, aliases().size(), "no duplicate alias");
|
||||
@@ -252,6 +253,8 @@ public class TalkerAliasAutoAdderTest
|
||||
decode(roaming, "ROAMER");
|
||||
Alias alias = alias(roaming);
|
||||
assertTrue(alias.getAliasIdentifiers().get(0) instanceof P25FullyQualifiedRadio);
|
||||
assertEquals("Fully Qualified Radio ID:781824.291.777 Protocol:APCO-25",
|
||||
alias.getAliasIdentifiers().get(0).valueProperty().get());
|
||||
assertNull(alias(RADIO), "local radio with the same value isn't aliased");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user