- moved getAutomationPattern to public
- added some checks and minor fixes git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@195 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -67,11 +67,11 @@ public:
|
||||
m_minValue( _min ),
|
||||
m_maxValue( _max ),
|
||||
m_step( _step ),
|
||||
m_curLevel( (int)( _val / _step ) ),
|
||||
m_automation_pattern( NULL ),
|
||||
m_track( _track ),
|
||||
m_update_first( TRUE )
|
||||
{
|
||||
m_curLevel = level( _val );
|
||||
m_minLevel = level( _min );
|
||||
m_maxLevel = level( _max );
|
||||
}
|
||||
@@ -341,6 +341,17 @@ public:
|
||||
m_data = _data;
|
||||
}
|
||||
|
||||
inline automationPattern * getAutomationPattern( void )
|
||||
{
|
||||
if( !m_automation_pattern )
|
||||
{
|
||||
m_automation_pattern = new automationPattern( m_track,
|
||||
this );
|
||||
syncAutomationPattern();
|
||||
}
|
||||
return( m_automation_pattern );
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
virtual void redoStep( journalEntry & _je )
|
||||
@@ -377,20 +388,9 @@ protected:
|
||||
addJournalEntry( journalEntry( 0, value() - m_oldValue ) );
|
||||
}
|
||||
|
||||
inline automationPattern * getAutomationPattern( void )
|
||||
{
|
||||
if( !m_automation_pattern )
|
||||
{
|
||||
m_automation_pattern = new automationPattern( m_track,
|
||||
this );
|
||||
syncAutomationPattern();
|
||||
}
|
||||
return( m_automation_pattern );
|
||||
}
|
||||
|
||||
inline void setFirstValue( void )
|
||||
{
|
||||
if( m_update_first )
|
||||
if( m_update_first && m_automation_pattern )
|
||||
{
|
||||
m_automation_pattern->putValue( midiTime( 0 ),
|
||||
m_curLevel, FALSE );
|
||||
@@ -402,6 +402,11 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
inline bool nullTrack( void )
|
||||
{
|
||||
return( m_track == NULL );
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
T m_value;
|
||||
|
||||
Reference in New Issue
Block a user