check for frame before applying selection
This commit is contained in:
1 parent
afdb0aed2b
commit
d0ae3298e1
1 file changed
+18
-15
@@ -491,22 +491,25 @@ Void FramePropertiesSideBar::setSelection( const QRect &selectionArea )
|
||||
// This is necessary to stop computation because image.bits() is
|
||||
// currently used by threaded histogram algorithm.
|
||||
|
||||
m_cSelectionArea = selectionArea;
|
||||
if( m_pcFrame )
|
||||
{
|
||||
m_cSelectionArea = selectionArea;
|
||||
|
||||
if( selectionArea.isValid() )
|
||||
{
|
||||
histogramWidget->stopHistogramComputation();
|
||||
histogramWidget->updateSelectionData( new PlaYUVerFrame(m_pcFrame, selectionArea));
|
||||
fullImageButton->show();
|
||||
selectionImageButton->show();
|
||||
selectionImageButton->click();
|
||||
slotRenderingChanged( HistogramWidget::ImageSelectionHistogram );
|
||||
}
|
||||
else
|
||||
{
|
||||
fullImageButton->hide();
|
||||
selectionImageButton->hide();
|
||||
slotRenderingChanged( HistogramWidget::FullImageHistogram );
|
||||
if( selectionArea.isValid() )
|
||||
{
|
||||
histogramWidget->stopHistogramComputation();
|
||||
histogramWidget->updateSelectionData( new PlaYUVerFrame(m_pcFrame, selectionArea));
|
||||
fullImageButton->show();
|
||||
selectionImageButton->show();
|
||||
selectionImageButton->click();
|
||||
slotRenderingChanged( HistogramWidget::ImageSelectionHistogram );
|
||||
}
|
||||
else
|
||||
{
|
||||
fullImageButton->hide();
|
||||
selectionImageButton->hide();
|
||||
slotRenderingChanged( HistogramWidget::FullImageHistogram );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user