From 9ba817847f4ddcf36e382ae8f14ab0d5aff98d17 Mon Sep 17 00:00:00 2001 From: Tats Date: Fri, 3 Jul 2015 19:01:51 -0600 Subject: [PATCH] Bugfix: Infinite call loop created by shared scene in destination and outputwindow canvases and the updateCanvas() slot. --- MainWindow.cpp | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/MainWindow.cpp b/MainWindow.cpp index 2126a62..bed1ece 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -984,26 +984,13 @@ void MainWindow::createLayout() outputWindow = new OutputGLWindow(destinationCanvas); outputWindow->setVisible(true); - // Source changed -> change destination -// connect(sourceCanvas, SIGNAL(shapeChanged(MShape*)), -// destinationCanvas, SLOT(updateCanvas())); - + // Source scene changed -> change destination. connect(sourceCanvas->scene(), SIGNAL(changed(const QList&)), - destinationCanvas, SLOT(updateCanvas())); - - // Source changed -> change output window -// connect(sourceCanvas, SIGNAL(shapeChanged(MShape*)), -// outputWindow->getCanvas(), SLOT(updateCanvas())); - - connect(sourceCanvas->scene(), SIGNAL(changed(const QList&)), - outputWindow->getCanvas(), SLOT(updateCanvas())); - - // Destination changed -> change output window -// connect(destinationCanvas, SIGNAL(shapeChanged(MShape*)), -// outputWindow->getCanvas(), SLOT(updateCanvas())); + destinationCanvas, SLOT(update())); + // Destination scene changed -> change output window. connect(destinationCanvas->scene(), SIGNAL(changed(const QList&)), - outputWindow->getCanvas(), SLOT(updateCanvas())); + outputWindow->getCanvas(), SLOT(update())); // Output changed -> change destinatioin // XXX si je decommente cette ligne alors quand je clique sur ajouter media ca gele...