when connecting object to automation-pattern which has no object connected yet, set default-value (closes #2026102)
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1385 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,5 +1,15 @@
|
||||
2008-07-27 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
|
||||
|
||||
* include/instrument_track.h:
|
||||
* src/tracks/instrument_track.cpp:
|
||||
reverted previous change of some models from floatModel to intModel as
|
||||
it caused crashes in knob-class
|
||||
|
||||
* include/automation_pattern.h:
|
||||
* src/core/automation_pattern.cpp:
|
||||
when connecting object to automation-pattern which has no object
|
||||
connected yet, set default-value (closes #2026102)
|
||||
|
||||
* plugins/vst_base/CMakeLists.txt:
|
||||
added missing support for out-of-tree builds
|
||||
|
||||
|
||||
@@ -49,10 +49,7 @@ public:
|
||||
automationPattern( const automationPattern & _pat_to_copy );
|
||||
virtual ~automationPattern();
|
||||
|
||||
inline void addObject( automatableModel * _obj )
|
||||
{
|
||||
m_objects += _obj;
|
||||
}
|
||||
void addObject( automatableModel * _obj );
|
||||
|
||||
const automatableModel * firstObject( void ) const;
|
||||
|
||||
|
||||
@@ -92,6 +92,20 @@ automationPattern::~automationPattern()
|
||||
|
||||
|
||||
|
||||
void automationPattern::addObject( automatableModel * _obj )
|
||||
{
|
||||
m_objects += _obj;
|
||||
// been empty before?
|
||||
if( m_objects.size() == 1 && !hasAutomation() )
|
||||
{
|
||||
// then initialize default-value
|
||||
putValue( 0, _obj->value<float>(), FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const automatableModel * automationPattern::firstObject( void ) const
|
||||
{
|
||||
if( !m_objects.isEmpty() )
|
||||
|
||||
Reference in New Issue
Block a user