Highlight the current device

pull/2126/head
Daniele Forsi 2024-05-26 09:54:11 +02:00
rodzic 4538d46c5d
commit c7c0247f81
2 zmienionych plików z 13 dodań i 0 usunięć

Wyświetl plik

@ -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;
}
}
}

Wyświetl plik

@ -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;