Refresh call camera modes on device changes outside the GUI
This commit is contained in:
1 parent
6e0d3f3022
commit
fcdc098415
3 files changed
+23
-13
No files matched your search
@@ -366,7 +366,10 @@ CallWindow::CallWindow(QWidget* parent)
|
||||
m_camera->addItem(camera.name, camera.id);
|
||||
m_camera->setItemData(m_camera->count() - 1, sizes, Qt::UserRole + 1);
|
||||
}
|
||||
const int index = m_camera->findData(selected);
|
||||
int index = m_camera->findData(selected);
|
||||
if (index < 0) for (int i = 0; i < m_camera->count(); ++i) {
|
||||
if (!m_camera->itemData(i, Qt::UserRole + 1).toList().isEmpty()) { index = i; break; }
|
||||
}
|
||||
if (index >= 0) m_camera->setCurrentIndex(index);
|
||||
refreshModes();
|
||||
if (m_videoEnabled->isChecked()) applyVideo();
|
||||
|
||||
Reference in new issue
Block a user