Merge pull request #1029 from diizy/stable-1.1

AFP improvements
This commit is contained in:
Vesa V
2014-07-26 16:27:15 +03:00
3 changed files with 5 additions and 3 deletions

View File

@@ -999,13 +999,14 @@ void AudioFileProcessorWaveView::updateGraph()
{
reverse();
}
else if( m_last_from == m_from && m_last_to == m_to )
else if( m_last_from == m_from && m_last_to == m_to && m_sampleBuffer.amplification() == m_last_amp )
{
return;
}
m_last_from = m_from;
m_last_to = m_to;
m_last_amp = m_sampleBuffer.amplification();
m_graph.fill( Qt::transparent );
QPainter p( &m_graph );

View File

@@ -239,6 +239,7 @@ private:
f_cnt_t m_to;
f_cnt_t m_last_from;
f_cnt_t m_last_to;
float m_last_amp;
knob * m_startKnob;
knob * m_endKnob;
knob * m_loopKnob;

View File

@@ -915,7 +915,7 @@ void SampleBuffer::visualize( QPainter & _p, const QRect & _dr,
const int h = _dr.height();
const int yb = h / 2 + _dr.y();
const float y_space = h*0.25f;
const float y_space = h*0.5f;
const int nb_frames = focus_on_range ? _to_frame - _from_frame : m_frames;
if( nb_frames < 60000 )
@@ -1381,7 +1381,7 @@ void SampleBuffer::setEndFrame( const f_cnt_t _e )
void SampleBuffer::setAmplification( float _a )
{
m_amplification = _a;
update( true );
emit sampleUpdated();
}