mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-20 04:27:48 -05:00
Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
@@ -330,12 +330,9 @@ public class AliasItemEditor extends Editor<Alias>
|
|||||||
|
|
||||||
if(alias != null)
|
if(alias != null)
|
||||||
{
|
{
|
||||||
alias.setName(getNameField().getText());
|
|
||||||
alias.setGroup(getGroupField().getText());
|
|
||||||
alias.setRecordable(getRecordAudioToggleSwitch().isSelected());
|
alias.setRecordable(getRecordAudioToggleSwitch().isSelected());
|
||||||
alias.setColor(ColorUtil.toInteger(getColorPicker().getValue()));
|
alias.setColor(ColorUtil.toInteger(getColorPicker().getValue()));
|
||||||
|
|
||||||
|
|
||||||
Icon icon = getIconNodeComboBox().getSelectionModel().getSelectedItem();
|
Icon icon = getIconNodeComboBox().getSelectionModel().getSelectedItem();
|
||||||
alias.setIconName(icon != null ? icon.getName() : null);
|
alias.setIconName(icon != null ? icon.getName() : null);
|
||||||
|
|
||||||
@@ -377,6 +374,27 @@ public class AliasItemEditor extends Editor<Alias>
|
|||||||
{
|
{
|
||||||
alias.addAliasAction(aliasAction);
|
alias.addAliasAction(aliasAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Hack: because we're using a sorted list for the alias editor, sometimes setting
|
||||||
|
//name and or group can cause list errors. So, we wrap each of these in a try/catch
|
||||||
|
//block to mitigate the error and effect the changes.
|
||||||
|
try
|
||||||
|
{
|
||||||
|
alias.setName(getNameField().getText());
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
mLog.error("Error while updating alias name.", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
alias.setGroup(getGroupField().getText());
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
mLog.error("Error while updating alias group value", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AliasList aliasList = mPlaylistManager.getAliasModel().getAliasList(alias.getAliasListName());
|
AliasList aliasList = mPlaylistManager.getAliasModel().getAliasList(alias.getAliasListName());
|
||||||
|
|||||||
Reference in New Issue
Block a user