mirror of
https://github.com/LMMS/lmms.git
synced 2026-04-27 09:28:16 -04:00
renamed disabled track logic to automation disabled
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@347 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -121,15 +121,15 @@ public:
|
||||
return( m_trackLabel );
|
||||
}
|
||||
|
||||
bool isDisabled( track * _track )
|
||||
bool automationDisabled( track * _track )
|
||||
{
|
||||
return( m_disabled_tracks.containsRef( _track ) );
|
||||
}
|
||||
void disableTrack( track * _track )
|
||||
void disableAutomation( track * _track )
|
||||
{
|
||||
m_disabled_tracks.append( _track );
|
||||
}
|
||||
void enableTrack( track * _track )
|
||||
void enableAutomation( track * _track )
|
||||
{
|
||||
m_disabled_tracks.removeRef( _track );
|
||||
}
|
||||
|
||||
@@ -266,8 +266,8 @@ protected:
|
||||
|
||||
private slots:
|
||||
void cloneTrack( void );
|
||||
void disableTrack( void );
|
||||
void enableTrack( void );
|
||||
void disableAutomation( void );
|
||||
void enableAutomation( void );
|
||||
void removeTrack( void );
|
||||
void removeTrackTimer( void );
|
||||
void muteBtnRightClicked( void );
|
||||
|
||||
@@ -1095,7 +1095,7 @@ void trackOperationsWidget::paintEvent( QPaintEvent * _pe )
|
||||
const char * trackOps_icon;
|
||||
const char * mute_active_icon;
|
||||
const char * mute_inactive_icon;
|
||||
if( currentBBTrack()->isDisabled(
|
||||
if( currentBBTrack()->automationDisabled(
|
||||
m_trackWidget->getTrack() ) )
|
||||
{
|
||||
trackOps_icon = "track_op_menu_disabled";
|
||||
@@ -1191,19 +1191,20 @@ void trackOperationsWidget::updateMenu( void )
|
||||
to_menu->clear();
|
||||
if( inBBEditor() )
|
||||
{
|
||||
if( currentBBTrack()->isDisabled( m_trackWidget->getTrack() ) )
|
||||
if( currentBBTrack()->automationDisabled(
|
||||
m_trackWidget->getTrack() ) )
|
||||
{
|
||||
to_menu->addAction( embed::getIconPixmap( "led_off",
|
||||
16, 16 ),
|
||||
tr( "Enable this track" ),
|
||||
this, SLOT( enableTrack() ) );
|
||||
tr( "Enable automation" ),
|
||||
this, SLOT( enableAutomation() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
to_menu->addAction( embed::getIconPixmap( "led_green",
|
||||
16, 16 ),
|
||||
tr( "Disable this track" ),
|
||||
this, SLOT( disableTrack() ) );
|
||||
tr( "Disable automation" ),
|
||||
this, SLOT( disableAutomation() ) );
|
||||
}
|
||||
}
|
||||
to_menu->addAction( embed::getIconPixmap( "edit_copy", 16, 16 ),
|
||||
@@ -1217,17 +1218,17 @@ void trackOperationsWidget::updateMenu( void )
|
||||
|
||||
|
||||
|
||||
void trackOperationsWidget::enableTrack( void )
|
||||
void trackOperationsWidget::enableAutomation( void )
|
||||
{
|
||||
currentBBTrack()->enableTrack( m_trackWidget->getTrack() );
|
||||
currentBBTrack()->enableAutomation( m_trackWidget->getTrack() );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void trackOperationsWidget::disableTrack( void )
|
||||
void trackOperationsWidget::disableAutomation( void )
|
||||
{
|
||||
currentBBTrack()->disableTrack( m_trackWidget->getTrack() );
|
||||
currentBBTrack()->disableAutomation( m_trackWidget->getTrack() );
|
||||
}
|
||||
|
||||
|
||||
@@ -1594,10 +1595,10 @@ track::~track()
|
||||
if( ( *it )->type() == BB_TRACK )
|
||||
{
|
||||
bbTrack * bb_track = (bbTrack *)*it;
|
||||
if( bb_track->isDisabled( this ) )
|
||||
if( bb_track->automationDisabled( this ) )
|
||||
{
|
||||
// Remove reference from bbTrack
|
||||
bb_track->enableTrack( this );
|
||||
bb_track->enableAutomation( this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,11 +460,11 @@ void bbTrack::saveTrackSpecificSettings( QDomDocument & _doc,
|
||||
for( trackVector::iterator it = tracks.begin(); it != tracks.end();
|
||||
++it, ++track_num )
|
||||
{
|
||||
if( isDisabled( *it ) )
|
||||
if( automationDisabled( *it ) )
|
||||
{
|
||||
QDomElement disabled = _doc.createElement(
|
||||
"disabled-track" );
|
||||
disabled.setAttribute( "num", track_num );
|
||||
"automation-disabled" );
|
||||
disabled.setAttribute( "track", track_num );
|
||||
_this.appendChild( disabled );
|
||||
}
|
||||
}
|
||||
@@ -498,10 +498,11 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this )
|
||||
node = _this.firstChild();
|
||||
while( !node.isNull() )
|
||||
{
|
||||
if( node.isElement() && node.nodeName() == "disabled-track" )
|
||||
if( node.isElement()
|
||||
&& node.nodeName() == "automation-disabled" )
|
||||
{
|
||||
disableTrack( tracks[node.toElement().attribute( "num" )
|
||||
.toInt()] );
|
||||
disableAutomation( tracks[node.toElement().attribute(
|
||||
"track" ).toInt()] );
|
||||
}
|
||||
node = node.nextSibling();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user