Browse Source

DeviceUISet: fixed deleteChannel. Fixes issue #625

chirpmodem-v8.0.0
f4exb 6 years ago
parent
commit
1e0be6a6f7
  1. 1
      sdrgui/device/deviceuiset.cpp
  2. 4
      sdrgui/webapi/webapiadaptergui.cpp

1
sdrgui/device/deviceuiset.cpp

@ -171,7 +171,6 @@ void DeviceUISet::deleteChannel(int channelIndex) @@ -171,7 +171,6 @@ void DeviceUISet::deleteChannel(int channelIndex)
qPrintable(m_channelInstanceRegistrations[channelIndex].m_channelName),
channelIndex);
m_channelInstanceRegistrations[channelIndex].m_gui->destroy();
m_channelInstanceRegistrations.removeAt(channelIndex);
renameChannelInstances();
}
}

4
sdrgui/webapi/webapiadaptergui.cpp

@ -2174,9 +2174,9 @@ int WebAPIAdapterGUI::devicesetChannelDelete( @@ -2174,9 +2174,9 @@ int WebAPIAdapterGUI::devicesetChannelDelete(
else
{
error.init();
*error.getMessage() = QString("There is no channel at index %1. There are %2 channels")
*error.getMessage() = QString("There is no channel at index %1. %2 channel(s) left")
.arg(channelIndex)
.arg(channelIndex < deviceSet->getNumberOfChannels());
.arg(deviceSet->getNumberOfChannels());
return 400;
}
}

Loading…
Cancel
Save