1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-18 21:58:37 -04:00

Multi device support: sort of works but plugin manager is not fixed

This commit is contained in:
f4exb
2016-05-16 21:51:53 +02:00
parent 00864bfb6c
commit 3f2b3cdea3
2 changed files with 22 additions and 18 deletions
+6 -7
View File
@@ -229,25 +229,24 @@ void MainWindow::removeLastDevice()
lastDeviceEngine->stopAcquistion();
lastDeviceEngine->removeSink(m_deviceUIs.back()->m_spectrumVis);
ui->tabChannels->removeTab(ui->tabChannels->count() - 1);
ui->tabSpectraGUI->removeTab(ui->tabSpectraGUI->count() - 1);
ui->tabSpectra->removeTab(ui->tabSpectra->count() - 1);
// PluginManager destructor does freeAll() which does stopAcquistion() but stopAcquistion()
// can be done several times only the first is active so it is fine to do it here
// On the other hand freeAll() must be executed only once
delete m_deviceUIs.back()->m_pluginManager;
//delete m_deviceUIs.back()->m_pluginManager;
//m_deviceUIs.back()->m_pluginManager->freeAll();
//delete m_deviceUIs.back()->m_deviceAPI; // TODO: reinstate when plugin manager is not created for each device
m_deviceUIs.back()->m_deviceAPI->freeAll();
ui->tabChannels->removeTab(ui->tabChannels->count() - 1);
lastDeviceEngine->stop();
m_dspEngine->removeLastDeviceEngine();
if (ui->tabInputsView->count() == ui->tabInputsSelect->count())
{
ui->tabInputsView->removeTab(ui->tabInputsView->count() - 1);
}
ui->tabInputsView->removeTab(ui->tabInputsView->count() - 1);
ui->tabInputsSelect->removeTab(ui->tabInputsSelect->count() - 1);
delete m_deviceUIs.back();