diff --git a/source/app/QualityMeasurementSidebar.cpp b/source/app/QualityMeasurementSidebar.cpp index 0797662..d32ea6a 100644 --- a/source/app/QualityMeasurementSidebar.cpp +++ b/source/app/QualityMeasurementSidebar.cpp @@ -118,7 +118,16 @@ Void QualityMeasurementSidebar::updateSubWindowList() } m_comboBoxRef->clear(); m_comboBoxRef->insertItems( 0, m_pcWindowListNames ); + m_comboBoxRef->setCurrentIndex( -1 ); + if( m_pcCurrentSubWindow ) + { + if( SubWindowHandle* refSubWindow = m_pcCurrentSubWindow->getRefSubWindow() ) + { + Int index = m_pcWindowListNames.contains( refSubWindow->getWindowName() ); + m_comboBoxRef->setCurrentIndex( index ); + } + } } Void QualityMeasurementSidebar::updateCurrentWindow( SubWindowHandle *subWindow ) @@ -134,6 +143,9 @@ Void QualityMeasurementSidebar::updateSidebarData() { if( SubWindowHandle* refSubWindow = m_pcCurrentSubWindow->getRefSubWindow() ) { + Int index = m_pcWindowListNames.contains( refSubWindow->getWindowName() ); + m_comboBoxRef->setCurrentIndex( index ); + PlaYUVerFrame* currFrame = m_pcCurrentSubWindow->getCurrFrame(); PlaYUVerFrame* refFrame = refSubWindow->getCurrFrame(); Double quality; @@ -155,10 +167,9 @@ Void QualityMeasurementSidebar::updateSidebarData() Void QualityMeasurementSidebar::slotReferenceChanged( Int index ) { - SubWindowHandle *subWindow; if( index > -1 && m_pcCurrentSubWindow ) { - subWindow = qobject_cast( m_pcMainWindowMdiArea->subWindowList().at( index ) ); + SubWindowHandle *subWindow = qobject_cast( m_pcMainWindowMdiArea->subWindowList().at( index ) ); if( subWindow ) { if( m_pcCurrentSubWindow->getCurrFrame()->haveSameFmt( subWindow->getCurrFrame() ) ) diff --git a/source/app/plaYUVerApp.cpp b/source/app/plaYUVerApp.cpp index ca94ae9..2f11728 100644 --- a/source/app/plaYUVerApp.cpp +++ b/source/app/plaYUVerApp.cpp @@ -624,6 +624,7 @@ Void plaYUVerApp::seekEvent( Int direction ) { m_pcCurrentSubWindow->seekRelativeEvent( direction > 0 ? true : false ); } + m_pcQualityMeasurement->updateSidebarData(); updateFrameProperties(); updateCurrFrameNum(); } @@ -644,6 +645,7 @@ Void plaYUVerApp::seekSliderEvent( Int new_frame_num ) { m_pcCurrentSubWindow->seekAbsoluteEvent( ( UInt )new_frame_num ); } + m_pcQualityMeasurement->updateSidebarData(); updateFrameProperties(); updateCurrFrameNum(); }