Channel selector has a max range of num channels

When you add and remove channels, the range of the
L.E.D. channel selector is correct.
This commit is contained in:
Andrew Kelley
2009-09-30 17:04:28 -07:00
parent 33753495bd
commit dd28a654b5
6 changed files with 54 additions and 13 deletions

View File

@@ -225,6 +225,9 @@ protected:
float fittedValue( float _value ) const;
float m_minValue;
float m_maxValue;
float m_value;
private:
void linkModel( AutomatableModel * _model );
@@ -232,10 +235,7 @@ private:
DataType m_dataType;
float m_value;
float m_initValue;
float m_minValue;
float m_maxValue;
float m_step;
float m_range;
@@ -281,7 +281,18 @@ signals:
{ \
return AutomatableModel::maxValue<type>(); \
} \
\
inline void setMinValue(type val) \
{ \
m_minValue = val; \
if( m_value < m_minValue ) m_value = m_minValue; \
} \
\
inline void setMaxValue(type val) \
{ \
m_maxValue = val; \
if( m_value > m_maxValue ) m_value = m_maxValue; \
}
// some typed AutomatableModel-definitions

View File

@@ -105,6 +105,8 @@ private:
QHBoxLayout * chLayout;
QWidget * m_channelAreaWidget;
EffectRackView * m_rackView;
void updateMaxChannelSelector();
} ;
#endif

View File

@@ -1,9 +1,9 @@
#ifndef SENDBUTTONINDICATOR_H
#define SENDBUTTONINDICATOR_H
#include <QLabel>
#include <QDebug>
#include <QPixmap>
#include <QtGui/QLabel>
#include <QtGui/QPixmap>
#include "FxLine.h"
#include "FxMixerView.h"