1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-11-25 17:43:17 -05:00

DeviceUISet: fixed deleteChannel. Fixes issue #625

This commit is contained in:
f4exb 2020-09-10 22:42:36 +02:00
parent 30b738c4b3
commit 721e1475dc
2 changed files with 2 additions and 3 deletions

View File

@ -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();
}
}

View File

@ -2277,9 +2277,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;
}
}