Commit f341a89f authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Slider is now dependent on the current renderer for its position.

parent 46b5dc71
......@@ -33,7 +33,8 @@ PreviewWidget::PreviewWidget( MainWorkflow* mainWorkflow, QWidget *parent ) :
QWidget( parent ),
m_ui( new Ui::PreviewWidget ),
m_currentPreviewRenderer( NULL ),
m_previewStopped( true )
m_previewStopped( true ),
m_sliderPosBackup( 0 )
{
m_ui->setupUi( this );
m_ui->groupBoxButton->hide();
......@@ -135,6 +136,7 @@ void PreviewWidget::seekSliderPressed()
void PreviewWidget::seekSliderMoved( int )
{
qDebug() << "Moved";
if ( m_ui->seekSlider->value() == m_ui->seekSlider->maximum() )
{
m_endReached = true;
......@@ -186,6 +188,7 @@ void PreviewWidget::endReached()
void PreviewWidget::changedTab( int tabId )
{
int tmp = m_ui->seekSlider->value();
if ( tabId == PreviewWidget::clipPreviewMode )
{
m_currentPreviewRenderer = m_clipPreview;
......@@ -198,4 +201,6 @@ void PreviewWidget::changedTab( int tabId )
else
qDebug() << "Unknown and uncoherent tabId for PreviewWidget : " << tabId;
m_currentMode = !m_currentMode;
m_ui->seekSlider->setValue( m_sliderPosBackup );
m_sliderPosBackup = tmp;
}
......@@ -55,7 +55,7 @@ private:
static const int clipPreviewMode = 1;
private:
int m_sliderPosBackup;
protected:
virtual void changeEvent( QEvent *e );
......
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