Restores context menus for channels in configuration window, channel

processing window, and spectral display window.
This commit is contained in:
denny
2015-09-26 18:35:28 -04:00
parent 550f5c5d27
commit 20f5d06104
7 changed files with 170 additions and 106 deletions

View File

@@ -592,7 +592,19 @@ public class LTRNetDecoderState extends DecoderState
broadcast( new DecoderStateEvent( this, Event.CONTINUATION, State.IDLE ) );
}
/**
* Indicates if the talkgroup is different than the talkgroup specified in
* the current call event
*/
private boolean isDifferentTalkgroup( String talkgroup )
{
return talkgroup != null &&
mCurrentCallEvent != null &&
mCurrentCallEvent.getToID() != null &&
!mCurrentCallEvent.getToID().contentEquals( talkgroup );
}
private void processCallMessage( LTRNetMessage message )
{
int group = message.getGroup();
@@ -609,11 +621,11 @@ public class LTRNetDecoderState extends DecoderState
{
String talkgroup = message.getTalkgroupID();
LTRCallEvent current = getCurrentLTRCallEvent();
final LTRCallEvent current = getCurrentLTRCallEvent();
/* If this is a new call or the talkgroup is different from the current
* call, create a new call event */
if( current == null || !current.getToID().contentEquals( talkgroup ) )
if( current == null || isDifferentTalkgroup( talkgroup ) )
{
/* Invalidate the current call */
if( current != null )