Commit 2da169af authored by Ming Rui Zhang's avatar Ming Rui Zhang Committed by Andreas Traczyk

videoview: don't restart the same device through the context menu

-  once the switch video input device option is triggered,
   only change if the current device is not the currently
   used device

Change-Id: I8b8c2a9a51981c5a8c2b4597d8b8f298d4397259
parent 2eefb501
......@@ -230,6 +230,9 @@ VideoView::showContextMenu(const QPoint& position)
connect(deviceAction, &QAction::triggered,
[this, deviceName]() {
auto device = deviceName.toStdString();
if (LRCInstance::avModel().getCurrentVideoCaptureDevice() == device) {
return;
}
resetPreview();
LRCInstance::avModel().switchInputTo(device);
LRCInstance::avModel().setCurrentVideoCaptureDevice(device);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment