diff --git a/ChangeLog b/ChangeLog index 1734e5e12..cd5431164 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,13 @@ * src/core/instrument_functions.cpp: Fixed arpeggio direction loading + * src/gui/widgets/effect_rack_view.cpp: + Display effect window and enable fx-chain when adding an effect + + * src/gui/widgets/effect_view.cpp: + Make effect controls window non-resizeable and remove maximize button + + 2008-04-26 Tobias Dorffel * plugins/stereo_enhancer/stereo_enhancer.cpp: diff --git a/include/automatable_model.h b/include/automatable_model.h index 248b41e20..98f17f917 100644 --- a/include/automatable_model.h +++ b/include/automatable_model.h @@ -108,6 +108,9 @@ public: { if( m_controller != NULL ) { + /*return minValue() + castValue( m_range * + m_equation->evaluate();*/ + return minValue() + castValue( m_range * m_controller->currentValue( _frameOffset ) ); } @@ -115,6 +118,17 @@ public: return m_value; } + // TODO: Combine factory and equation? + /* + setMappingEquation( string eq ) + { + modelSymbolFactory factory( this ); + equationCompiler cmp( factory ); + + m_equation = cmp.compile( eq ); + } + */ + inline controller * getController( void ) const { diff --git a/src/gui/widgets/effect_rack_view.cpp b/src/gui/widgets/effect_rack_view.cpp index 28d888d92..a3561dd93 100644 --- a/src/gui/widgets/effect_rack_view.cpp +++ b/src/gui/widgets/effect_rack_view.cpp @@ -219,8 +219,26 @@ void effectRackView::addEffect( void ) return; } - fxChain()->appendEffect( esd.instantiateSelectedPlugin( fxChain() ) ); + effect * fx = esd.instantiateSelectedPlugin( fxChain() ); + + fxChain()->m_enabledModel.setValue( TRUE ); + fxChain()->appendEffect( fx ); update(); + + // Find the effectView, and show the controls + for( QVector::iterator vit = + m_effectViews.begin(); + vit != m_effectViews.end(); ++vit ) + { + if( ( *vit )->getEffect() == fx ) + { + ( *vit )->editControls(); + + break; + } + } + + } diff --git a/src/gui/widgets/effect_view.cpp b/src/gui/widgets/effect_view.cpp index f4df943da..8e7cd6164 100644 --- a/src/gui/widgets/effect_view.cpp +++ b/src/gui/widgets/effect_view.cpp @@ -104,7 +104,12 @@ effectView::effectView( effect * _model, QWidget * _parent ) : m_controlView = getEffect()->getControls()->createView(); m_subWindow = engine::getMainWindow()->workspace()->addSubWindow( - m_controlView ); + m_controlView, + Qt::SubWindow | Qt::CustomizeWindowHint | Qt::WindowTitleHint | + Qt::WindowSystemMenuHint ); + m_subWindow->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed ); + m_subWindow->setFixedSize( m_subWindow->size() ); + connect( m_controlView, SIGNAL( closed() ), this, SLOT( closeEffects() ) ); diff --git a/src/gui/widgets/knob.cpp b/src/gui/widgets/knob.cpp index 4163d980a..182e48f59 100644 --- a/src/gui/widgets/knob.cpp +++ b/src/gui/widgets/knob.cpp @@ -597,6 +597,7 @@ void knob::connectToController( void ) void knob::friendlyUpdate( void ) { + //printf("%d v\n", controller::runningFrames() ); if( model()->getController() == NULL || controller::runningFrames() % (256*4) == 0 ) { update();