1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-28 18:58:48 -05:00

Highlight the current device

This commit is contained in:
Daniele Forsi 2024-05-26 09:54:11 +02:00
parent 4538d46c5d
commit c7c0247f81
2 changed files with 13 additions and 0 deletions

View File

@ -52,6 +52,7 @@ DeviceSetSelectionDialog::DeviceSetSelectionDialog(std::vector<DeviceUISet*>& de
m_deviceSetIndexes.push_back(i);
}
}
selectIndex(channelDeviceSetIndex);
}
DeviceSetSelectionDialog::~DeviceSetSelectionDialog()
@ -65,3 +66,14 @@ void DeviceSetSelectionDialog::accept()
m_hasChanged = true;
QDialog::accept();
}
void DeviceSetSelectionDialog::selectIndex(int channelDeviceSetIndex)
{
for (int i = 0; i < (int) m_deviceSetIndexes.size(); i++)
{
if (channelDeviceSetIndex == m_deviceSetIndexes[i]) {
ui->workspaceList->setCurrentRow(i);
break;
}
}
}

View File

@ -40,6 +40,7 @@ public:
bool hasChanged() const { return m_hasChanged; }
int getSelectedIndex() const { return m_selectedDeviceSetIndex; }
void selectIndex(int channelDeviceSetIndex);
private:
Ui::WorkspaceSelectionDialog *ui;