Commit ca45bd4a authored by Andreas Traczyk's avatar Andreas Traczyk

wizard: connect videowidget before starting preview

Change-Id: I2ba4b1fb6193e30769cb4e975fe776b0d3c152cb
parent 040714f4
......@@ -65,6 +65,7 @@ void PhotoboothWidget::startBooth()
{
hasAvatar_ = false;
ui->videoFeed->setResetPreview(true);
ui->videoFeed->connectRendering();
LRCInstance::avModel().stopPreview();
LRCInstance::avModel().startPreview();
ui->videoFeed->show();
......@@ -91,6 +92,7 @@ PhotoboothWidget::on_importButton_clicked()
picturesDir,
tr("Image Files") + " (*.jpg *.jpeg *.png)");
if (fileName_.isEmpty()) {
ui->videoFeed->connectRendering();
LRCInstance::avModel().startPreview();
return;
}
......
......@@ -40,6 +40,8 @@ VideoWidget::slotRendererStarted(const std::string& id)
{
Q_UNUSED(id);
QObject::disconnect(rendererConnections_.started);
// only one videowidget will be used at the same time
if (not isVisible())
return;
......@@ -48,8 +50,6 @@ VideoWidget::slotRendererStarted(const std::string& id)
resetPreview_ = true;
QObject::disconnect(rendererConnections_.started);
QObject::disconnect(rendererConnections_.updated);
rendererConnections_.updated = connect(
&LRCInstance::avModel(),
......
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