From abe95e2e1ad8532e833d188474775576e176a829 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Thu, 4 Apr 2013 22:11:38 -0400 Subject: [PATCH] Make Show2 hide its window if finalize is called, fix a video reading problem --- openbr/plugins/gui.cpp | 6 +++--- openbr/plugins/stream.cpp | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/openbr/plugins/gui.cpp b/openbr/plugins/gui.cpp index 3d37522..873c25e 100644 --- a/openbr/plugins/gui.cpp +++ b/openbr/plugins/gui.cpp @@ -132,7 +132,7 @@ public: gui->moveToThread(QApplication::instance()->thread()); // Connect our signals to the proxy's slots connect(this, SIGNAL(needWindow()), gui, SLOT(createWindow()), Qt::BlockingQueuedConnection); - connect(this, SIGNAL(updateImage(QPixmap)), gui,SLOT(showImage(QPixmap))); + connect(this, SIGNAL(updateImage(QPixmap)), gui,SLOT(showImage(QPixmap)), Qt::BlockingQueuedConnection); } ~Show2Transform() @@ -159,7 +159,6 @@ public: // build label QString newTitle; foreach (const QString & s, keys) { - if (t.file.contains(s)) { QString out = t.file.get(s); newTitle = newTitle + s + ": " + out + " "; @@ -188,7 +187,8 @@ public: void finalize(TemplateList & output) { (void) output; - // todo: hide window? + if (gui && gui->window) + gui->window->hide(); } void init() diff --git a/openbr/plugins/stream.cpp b/openbr/plugins/stream.cpp index 6594517..680bf43 100644 --- a/openbr/plugins/stream.cpp +++ b/openbr/plugins/stream.cpp @@ -295,6 +295,8 @@ private: next_idx++; bool res = video.read(output.data.last().last()); + output.data.last().last() = output.data.last().last().clone(); + if (!res) { video_ok = false; return video_ok; -- libgit2 0.21.4