mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-16 05:11:49 -05:00
Fix previous sink plugin GUI delete by doing it explicitly in the main window
This commit is contained in:
parent
c3b9c268ee
commit
b770e656b3
@ -300,6 +300,11 @@ void MainWindow::addSinkDevice()
|
|||||||
|
|
||||||
// create a file sink by default
|
// create a file sink by default
|
||||||
m_pluginManager->selectSampleSinkBySerialOrSequence("sdrangel.samplesink.filesink", "0", 0, m_deviceUIs.back()->m_deviceSinkAPI);
|
m_pluginManager->selectSampleSinkBySerialOrSequence("sdrangel.samplesink.filesink", "0", 0, m_deviceUIs.back()->m_deviceSinkAPI);
|
||||||
|
|
||||||
|
// delete previous plugin GUI if it exists
|
||||||
|
m_deviceUIs.back()->m_deviceSinkAPI->getPluginInterface()->deleteSampleSourcePluginInstanceGUI(
|
||||||
|
m_deviceUIs.back()->m_deviceSinkAPI->getSampleSinkPluginInstanceGUI());
|
||||||
|
|
||||||
DeviceSampleSink *sink = m_deviceUIs.back()->m_deviceSinkAPI->getPluginInterface()->createSampleSinkPluginInstanceOutput(
|
DeviceSampleSink *sink = m_deviceUIs.back()->m_deviceSinkAPI->getPluginInterface()->createSampleSinkPluginInstanceOutput(
|
||||||
m_deviceUIs.back()->m_deviceSinkAPI->getSampleSinkId(), m_deviceUIs.back()->m_deviceSinkAPI);
|
m_deviceUIs.back()->m_deviceSinkAPI->getSampleSinkId(), m_deviceUIs.back()->m_deviceSinkAPI);
|
||||||
m_deviceUIs.back()->m_deviceSinkAPI->setSampleSink(sink);
|
m_deviceUIs.back()->m_deviceSinkAPI->setSampleSink(sink);
|
||||||
|
@ -498,7 +498,6 @@ int PluginManager::selectSampleSinkBySerialOrSequence(const QString& sinkId, con
|
|||||||
<< " seq: " << m_sampleSinkDevices[index].m_deviceSequence;
|
<< " seq: " << m_sampleSinkDevices[index].m_deviceSequence;
|
||||||
|
|
||||||
deviceAPI->stopGeneration();
|
deviceAPI->stopGeneration();
|
||||||
deviceAPI->setSampleSinkPluginInstanceUI(0); // this effectively destroys the previous GUI if it exists
|
|
||||||
|
|
||||||
// m_sampleSourcePluginGUI = pluginGUI;
|
// m_sampleSourcePluginGUI = pluginGUI;
|
||||||
deviceAPI->setSampleSinkSequence(m_sampleSinkDevices[index].m_deviceSequence);
|
deviceAPI->setSampleSinkSequence(m_sampleSinkDevices[index].m_deviceSequence);
|
||||||
|
Loading…
Reference in New Issue
Block a user