mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 01:18:38 -05:00
Highlight the current device
This commit is contained in:
parent
4538d46c5d
commit
c7c0247f81
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user