Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't show tuner on spectral display while disabled #1236

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public ClearTunerMenuItem(SpectralDisplayPanel spectralDisplayPanel)
@Override
public void actionPerformed(ActionEvent e)
{
mSpectralDisplayPanel.clearTuner();
SystemProperties properties = SystemProperties.getInstance();
properties.set(SpectralDisplayPanel.SPECTRAL_DISPLAY_ENABLED, false);
mSpectralDisplayPanel.clearTuner();
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public void actionPerformed(ActionEvent e)
@Override
public void run()
{
mDiscoveredTunerModel.broadcast(new TunerEvent(mTuner, TunerEvent.Event.REQUEST_MAIN_SPECTRAL_DISPLAY));
SystemProperties properties = SystemProperties.getInstance();
properties.set(SpectralDisplayPanel.SPECTRAL_DISPLAY_ENABLED, true);
mDiscoveredTunerModel.broadcast(new TunerEvent(mTuner, TunerEvent.Event.REQUEST_MAIN_SPECTRAL_DISPLAY));
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,11 @@ public void process(SourceEvent event)
public void showTuner(Tuner tuner)
{
clearTuner();
if(!SystemProperties.getInstance().get(SpectralDisplayPanel.SPECTRAL_DISPLAY_ENABLED, true))
{
//Spectral display is disabled, stop
return;
}

mComplexDftProcessor.clearBuffer();

Expand Down