mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-05 07:24:44 -04:00
Fix renumberate deviceset without modifying claimed of SamplingDevice
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QGlobalStatic>
|
||||
#include <functional>
|
||||
|
||||
#include "deviceenumerator.h"
|
||||
|
||||
@@ -432,6 +433,20 @@ void DeviceEnumerator::removeMIMOSelection(int tabIndex)
|
||||
}
|
||||
}
|
||||
|
||||
void DeviceEnumerator::renumeratetabIndex(int skippedTabIndex)
|
||||
{
|
||||
std::reference_wrapper<DevicesEnumeration> denums[] = {m_rxEnumeration, m_txEnumeration, m_mimoEnumeration};
|
||||
for (DevicesEnumeration &denum : denums)
|
||||
{
|
||||
for (DevicesEnumeration::iterator it = denum.begin(); it != denum.end(); ++it)
|
||||
{
|
||||
if (it->m_samplingDevice.claimed > skippedTabIndex) {
|
||||
it->m_samplingDevice.claimed--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int DeviceEnumerator::getFileInputDeviceIndex() const
|
||||
{
|
||||
for (DevicesEnumeration::const_iterator it = m_rxEnumeration.begin(); it != m_rxEnumeration.end(); ++it)
|
||||
|
||||
Reference in New Issue
Block a user