From 51fa28169309bee1ce8be0e7972b7e55131b7a69 Mon Sep 17 00:00:00 2001 From: Joao Carreira Date: Sat, 7 Nov 2015 19:06:02 +0000 Subject: [PATCH] Fix slider change by user (might need to be improved) --- app/ModulesHandle.cpp | 2 +- app/VideoHandle.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/ModulesHandle.cpp b/app/ModulesHandle.cpp index 64bc5dd..2612144 100644 --- a/app/ModulesHandle.cpp +++ b/app/ModulesHandle.cpp @@ -269,7 +269,7 @@ Void ModulesHandle::activateModule() return; } - if( keyModifiers & Qt::ControlModifier || pcVideoSubWindow->checkCategory( VideoSubWindow::MODULE_SUBWINDOW ) ) + if( ( keyModifiers & Qt::ControlModifier ) || pcVideoSubWindow->checkCategory( VideoSubWindow::MODULE_SUBWINDOW ) ) { bTmpForceNewWindow = true; } diff --git a/app/VideoHandle.cpp b/app/VideoHandle.cpp index 5544e19..7ff7f97 100644 --- a/app/VideoHandle.cpp +++ b/app/VideoHandle.cpp @@ -119,11 +119,11 @@ Void VideoHandle::createActions() m_pcFrameSlider = new QSlider; m_pcFrameSlider->setOrientation( Qt::Horizontal ); - m_pcFrameSlider->setMaximumWidth( 100 ); - m_pcFrameSlider->setMaximumWidth( /* 300 */2000 ); + m_pcFrameSlider->setMaximumWidth( 2000 ); m_pcFrameSlider->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ) ); m_pcFrameSlider->setEnabled( false ); - connect( m_pcFrameSlider, SIGNAL( sliderMoved(int) ), this, SLOT( seekSliderEvent(int) ) ); + m_pcFrameSlider->setTracking( false ); + connect( m_pcFrameSlider, SIGNAL( valueChanged(int) ), this, SLOT( seekSliderEvent(int) ) ); } QMenu* VideoHandle::createMenu() @@ -615,7 +615,7 @@ Void VideoHandle::seekVideo() Void VideoHandle::seekSliderEvent( Int new_frame_num ) { - if( m_pcCurrentVideoSubWindow ) + if( m_pcCurrentVideoSubWindow && !m_bIsPlaying ) // TODO: Fix this slot { if( m_acPlayingSubWindows.contains( m_pcCurrentVideoSubWindow ) ) {