Skip to content

Commit

Permalink
Divide knob step size by 1000 for LADSPA effects (LMMS#4574)
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRobotMusic authored May 19, 2020
1 parent a47cd26 commit 6758c29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/LadspaControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ LadspaControl::LadspaControl( Model * _parent, port_desc_t * _port,
( m_port->max - m_port->min )
/ ( m_port->name.toUpper() == "GAIN"
&& m_port->max == 10.0f ? 4000.0f :
( m_port->suggests_logscale ? 8000.0f : 800.0f ) ) );
( m_port->suggests_logscale ? 8000000.0f : 800000.0f ) ) );
m_knobModel.setInitValue( m_port->def );
connect( &m_knobModel, SIGNAL( dataChanged() ),
this, SLOT( knobChanged() ) );
Expand Down
3 changes: 2 additions & 1 deletion src/gui/widgets/Knob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,8 @@ void Knob::paintEvent( QPaintEvent * _me )
void Knob::wheelEvent( QWheelEvent * _we )
{
_we->accept();
const int inc = ( _we->delta() > 0 ) ? 1 : -1;
const float stepMult = model()->range() / 2000 / model()->step<float>();
const int inc = ( ( _we->delta() > 0 ) ? 1 : -1 ) * ( ( stepMult < 1 ) ? 1 : stepMult );
model()->incValue( inc );


Expand Down

0 comments on commit 6758c29

Please sign in to comment.