mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-01-02 14:50:01 +01:00
only set idle when mode is active
This commit is contained in:
parent
c95694582d
commit
42aca8ff8d
|
|
@ -924,7 +924,7 @@ void SpectrumAnalyzer::ConfigureDevice()
|
|||
traceModel.clearLiveData();
|
||||
traceModel.setSpan(settings.freqStart, settings.freqStop);
|
||||
} else {
|
||||
if(window->getDevice()) {
|
||||
if(window->getDevice() && isActive) {
|
||||
changingSettings = true;
|
||||
// single sweep finished
|
||||
window->getDevice()->setIdle([=](bool){
|
||||
|
|
|
|||
|
|
@ -2039,7 +2039,7 @@ void VNA::ConfigureDevice(bool resetTraces, std::function<void(bool)> cb)
|
|||
changingSettings = false;
|
||||
}
|
||||
} else {
|
||||
if(window->getDevice()) {
|
||||
if(window->getDevice() && isActive) {
|
||||
changingSettings = true;
|
||||
window->getDevice()->setIdle([=](bool){
|
||||
changingSettings = false;
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@ void Mode::activate()
|
|||
|
||||
void Mode::deactivate()
|
||||
{
|
||||
isActive = false;
|
||||
QSettings settings;
|
||||
// save dock/toolbar visibility
|
||||
for(auto d : docks) {
|
||||
|
|
@ -118,6 +117,7 @@ void Mode::deactivate()
|
|||
if(window->getDevice()) {
|
||||
window->getDevice()->setIdle();
|
||||
}
|
||||
isActive = false;
|
||||
}
|
||||
|
||||
QString Mode::TypeToName(Mode::Type t)
|
||||
|
|
|
|||
Loading…
Reference in a new issue