Merge pull request #1678 from badosu/fix-moving-channels-segfault

Fix segfault when moving channels
This commit is contained in:
Tres Finocchiaro
2015-04-17 19:41:49 +00:00
5 changed files with 63 additions and 75 deletions

View File

@@ -100,14 +100,12 @@ private:
int knobPosY() const
{
float fRange = m_model->maxValue() - m_model->minValue();
float realVal = m_model->value() - m_model->minValue();
float fRange = model()->maxValue() - model()->minValue();
float realVal = model()->value() - model()->minValue();
return height() - ( ( height() - m_knob->height() ) * ( realVal / fRange ) );
}
FloatModel * m_model;
void setPeak( float fPeak, float &targetPeak, float &persistentPeak, QTime &lastPeakTime );
int calculateDisplayPeak( float fPeak );

View File

@@ -53,6 +53,8 @@ public:
public:
FxChannelView(QWidget * _parent, FxMixerView * _mv, int _chIndex );
void setChannelIndex( int index );
FxLine * m_fxLine;
PixmapButton * m_muteBtn;
PixmapButton * m_soloBtn;
@@ -97,6 +99,7 @@ public:
// move the channel to the left or right
void moveChannelLeft(int index);
void moveChannelLeft(int index, int focusIndex);
void moveChannelRight(int index);
// make sure the display syncs up with the fx mixer.