[Summary] Disable Master Track's name editing

[Reviewed] GZharun
This commit is contained in:
nikolay 2014-09-04 14:40:53 +03:00
parent 9aabb6f48b
commit cb15bfac1e
2 changed files with 12 additions and 0 deletions

View file

@ -421,6 +421,10 @@ MixerStrip::begin_name_edit ()
if( _route->is_master () )
return;
boost::shared_ptr<AudioTrack> audio_track = boost::dynamic_pointer_cast<AudioTrack>(_route);
if( audio_track && audio_track->is_master_track() )
return;
_name_entry.set_text ( _route->name() );
name_button.hide();
_name_entry.show ();

View file

@ -2271,6 +2271,14 @@ RouteTimeAxisView::reset_processor_automation_curves ()
bool
RouteTimeAxisView::can_edit_name () const
{
if( _route->is_master () )
return false;
boost::shared_ptr<AudioTrack> audio_track = boost::dynamic_pointer_cast<AudioTrack>( _route );
if( audio_track && audio_track->is_master_track() )
return false;
/* we do not allow track name changes if it is record enabled
*/
return !_route->record_enabled();