1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-17 13:51:47 -05:00

Channel add action: fixed tab view being in use. Fixes #645

This commit is contained in:
f4exb 2020-09-24 23:23:54 +02:00
parent cc97dd15a9
commit 8e702fd900

View File

@ -1822,11 +1822,11 @@ void MainWindow::sampleSinkChanged(int tabIndex, int newDeviceIndex)
void MainWindow::channelAddClicked(int channelIndex) void MainWindow::channelAddClicked(int channelIndex)
{ {
// Do it in the currently selected source tab // Do it in the currently selected source tab
int currentSourceTabIndex = ui->tabInputsView->currentIndex(); int currentChannelTabIndex = ui->tabChannels->currentIndex();
if (currentSourceTabIndex >= 0) if (currentChannelTabIndex >= 0)
{ {
DeviceUISet *deviceUI = m_deviceUIs[currentSourceTabIndex]; DeviceUISet *deviceUI = m_deviceUIs[currentChannelTabIndex];
if (deviceUI->m_deviceSourceEngine) // source device => Rx channels if (deviceUI->m_deviceSourceEngine) // source device => Rx channels
{ {
@ -1843,7 +1843,7 @@ void MainWindow::channelAddClicked(int channelIndex)
int nbRxChannels = deviceUI->getNumberOfAvailableRxChannels(); int nbRxChannels = deviceUI->getNumberOfAvailableRxChannels();
int nbTxChannels = deviceUI->getNumberOfAvailableTxChannels(); int nbTxChannels = deviceUI->getNumberOfAvailableTxChannels();
qDebug("MainWindow::channelAddClicked: MIMO: tab: %d nbRx: %d nbTx: %d selected: %d", qDebug("MainWindow::channelAddClicked: MIMO: tab: %d nbRx: %d nbTx: %d selected: %d",
currentSourceTabIndex, nbRxChannels, nbTxChannels, channelIndex); currentChannelTabIndex, nbRxChannels, nbTxChannels, channelIndex);
if (channelIndex < nbRxChannels) { if (channelIndex < nbRxChannels) {
m_pluginManager->createRxChannelInstance( m_pluginManager->createRxChannelInstance(