mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-19 03:57:26 -05:00
Preserve user radio aliases outside the Talker Alias group (#2689)
Limit automatic renaming to the existing managed group. Keep exact-match user aliases outside that group unchanged without creating duplicates, while retaining confirmation and multi-identifier protections for managed aliases. Explain moving aliases out of the group in the tooltip and cover custom, ungrouped, managed and moved aliases in regression tests.
This commit is contained in:
@@ -213,6 +213,13 @@ public class TalkerAliasAutoAdder implements BiConsumer<RadioIdentifier,TalkerAl
|
||||
return;
|
||||
}
|
||||
|
||||
if(!ALIAS_GROUP.equals(existing.getGroup()))
|
||||
{
|
||||
//Only maintain aliases in the managed group. Existing user aliases must not be renamed or duplicated.
|
||||
markChecked(key, value);
|
||||
return;
|
||||
}
|
||||
|
||||
if(getIdentityCount(existing) > 1)
|
||||
{
|
||||
//The alias also identifies other radios or talkgroups - leave it alone.
|
||||
|
||||
@@ -693,9 +693,10 @@ public abstract class ChannelConfigurationEditor extends Editor<Channel>
|
||||
{
|
||||
mAutoAddTalkerAliasesCheckBox = new CheckBox("Auto-Add Talker Aliases");
|
||||
mAutoAddTalkerAliasesCheckBox.setDisable(true);
|
||||
mAutoAddTalkerAliasesCheckBox.setTooltip(new Tooltip("Adds a radio alias for each talker alias decoded " +
|
||||
"on this system, named with the talker alias, and renames the radio alias when its talker alias " +
|
||||
"changes. Applies when the channel is (re)started."));
|
||||
mAutoAddTalkerAliasesCheckBox.setTooltip(new Tooltip("Adds decoded talker aliases as radio aliases in " +
|
||||
"the Talker Alias group. Only radio aliases in that group are automatically renamed; existing " +
|
||||
"radio aliases outside the group are left unchanged. Move an alias out of the Talker Alias group " +
|
||||
"to preserve a custom name. Applies when the channel is (re)started."));
|
||||
mAutoAddTalkerAliasesCheckBox.setOnAction(event -> modifiedProperty().set(true));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user