From 258a0ec7f829ac9fb1ce24b12df0a422dbf90804 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Thu, 24 Sep 2015 11:37:24 +0100 Subject: [PATCH] Skip window selection when the available number of windows are equal to the required ones --- app/ModulesHandle.cpp | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/app/ModulesHandle.cpp b/app/ModulesHandle.cpp index 7bc7349..a22180a 100644 --- a/app/ModulesHandle.cpp +++ b/app/ModulesHandle.cpp @@ -286,21 +286,31 @@ Void ModulesHandle::activateModule() { for( Int i = 0; i < windowsList.size(); i++ ) { - dialogWindowsSelection.selectSubWindow( windowsList.at( i ) ); + videoSubWindowList.append( qobject_cast( windowsList.at( i ) ) ); } } else { - dialogWindowsSelection.selectSubWindow( pcVideoSubWindow ); - } - if( dialogWindowsSelection.exec() == QDialog::Accepted ) - { - VideoSubWindow *videoSubWindow; - QList subWindowList = dialogWindowsSelection.getSelectedWindows(); - for( Int i = 0; i < subWindowList.size(); i++ ) + if( windowsList.size() <= numberOfFrames ) { - videoSubWindow = qobject_cast( subWindowList.at( i ) ); - videoSubWindowList.append( videoSubWindow ); + for( Int i = 0; i < windowsList.size(); i++ ) + { + dialogWindowsSelection.selectSubWindow( windowsList.at( i ) ); + } + } + else + { + dialogWindowsSelection.selectSubWindow( pcVideoSubWindow ); + } + if( dialogWindowsSelection.exec() == QDialog::Accepted ) + { + VideoSubWindow *videoSubWindow; + QList subWindowList = dialogWindowsSelection.getSelectedWindows(); + for( Int i = 0; i < subWindowList.size(); i++ ) + { + videoSubWindow = qobject_cast( subWindowList.at( i ) ); + videoSubWindowList.append( videoSubWindow ); + } } } // Check for same fmt in more than one frame modules