Minor improvements to effect rack and controls

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@944 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Paul Giblock
2008-04-29 03:53:21 +00:00
parent 21049cf3d0
commit 96ba8ef3e6
5 changed files with 47 additions and 2 deletions

View File

@@ -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<effectView *>::iterator vit =
m_effectViews.begin();
vit != m_effectViews.end(); ++vit )
{
if( ( *vit )->getEffect() == fx )
{
( *vit )->editControls();
break;
}
}
}

View File

@@ -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() ) );

View File

@@ -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();