fixed inlineAutomation::hasAutomation()

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1251 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-06-30 21:48:21 +00:00
parent 1464d03b74
commit 459b13aad3
6 changed files with 60 additions and 12 deletions

View File

@@ -1,5 +1,48 @@
2008-06-30 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* src/core/engine.cpp:
clear whole project before deleting everything - fixes segfault when
quitting with controllers added
* src/core/effect_chain.cpp:
fixed crash when an effect failed to load because its sub-plugin is
missing (closes #2005910)
* src/core/automation_pattern.cpp:
- initialize first value in time-map
- better default-model
- change automation-pattern to NULL if opened in automation editor
during destruction
- improved default-label
- when used in track-container with fixed TCOs, update length
* src/core/track.cpp:
* src/tracks/bb_track.cpp:
* src/tracks/instrument_track.cpp:
* src/tracks/sample_track.cpp:
save/restore name-property inside track-class
* src/tracks/automation_track.cpp:
set a proper name per default
* src/gui/automation_editor.cpp:
queued connections for models for not getting signaled at
destruction-time
* include/bb_editor.h:
* src/gui/bb_editor.cpp:
made it possible to add automation-tracks to BB-editor
* include/automation_pattern.h:
* include/inline_automation.h:
* include/note.h:
* src/core/inline_automation.cpp:
* src/core/note.cpp:
fixed inlineAutomation::hasAutomation()
* data/themes/default/style.css:
common font-size for various push-buttons
* src/core/config_mgr.cpp:
ask whether to create working-directory if it does not exist

View File

@@ -63,11 +63,21 @@ public:
void removeValue( const midiTime & _time );
inline const timeMap & getTimeMap( void ) const
{
return( m_timeMap );
}
inline timeMap & getTimeMap( void )
{
return( m_timeMap );
}
inline bool hasAutomation( void ) const
{
return( m_dynamic || getTimeMap()[0] != 0 );
}
float valueAt( const midiTime & _time );
const QString name( void ) const;

View File

@@ -45,9 +45,10 @@ public:
delete m_autoPattern;
}
inline bool hasAutomationPattern( void ) const
inline bool hasAutomation( void ) const
{
return( m_autoPattern != NULL );
return( m_autoPattern != NULL &&
m_autoPattern->hasAutomation() );
}
automationPattern * getAutomationPattern( void )

View File

@@ -153,7 +153,7 @@ public:
void editDetuningPattern( void );
bool hasDetuningInfo( void );
bool hasDetuningInfo( void ) const;
protected:

View File

@@ -31,7 +31,7 @@
void inlineAutomation::saveSettings( QDomDocument & _doc,
QDomElement & _parent )
{
if( hasAutomationPattern() )
if( hasAutomation() )
{
QDomElement ap = _doc.createElement(
automationPattern::classNodeName() );

View File

@@ -258,15 +258,9 @@ void note::createDetuning( void )
bool note::hasDetuningInfo( void )
bool note::hasDetuningInfo( void ) const
{
if( m_detuning->hasAutomationPattern() )
{
const automationPattern::timeMap & map =
m_detuning->getAutomationPattern()->getTimeMap();
return( map.size() > 1 || map[0] != 0 );
}
return( FALSE );
return( m_detuning && m_detuning->hasAutomation() );
}