Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Divide knob step size by 1000 for LADSPA effects, and minor changes to scroll wheel behavior #4574

Merged
merged 2 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/LadspaControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,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 :
Comment on lines 80 to 81
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This special case isn't handled. However, do we even need to keep this exception?

( 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 @@ -701,7 +701,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