only skip GUI-updates when connected to frequently changing controllers
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1449 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -74,11 +74,24 @@ public:
|
||||
m_sampleExact = _exact;
|
||||
}
|
||||
|
||||
ControllerTypes type( void ) const
|
||||
inline ControllerTypes type( void ) const
|
||||
{
|
||||
return( m_type );
|
||||
}
|
||||
|
||||
// return whether this controller updates models frequently - used for
|
||||
// determining when to update GUI
|
||||
inline bool frequentUpdates( void ) const
|
||||
{
|
||||
switch( m_type )
|
||||
{
|
||||
case LfoController: return( TRUE );
|
||||
case PeakController: return( TRUE );
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
virtual const QString & name( void ) const
|
||||
{
|
||||
|
||||
@@ -603,6 +603,8 @@ void knob::enterValue( void )
|
||||
void knob::friendlyUpdate( void )
|
||||
{
|
||||
if( model()->getControllerConnection() == NULL ||
|
||||
model()->getControllerConnection()->getController()->
|
||||
frequentUpdates() == FALSE ||
|
||||
controller::runningFrames() % (256*4) == 0 )
|
||||
{
|
||||
update();
|
||||
|
||||
Reference in New Issue
Block a user