Allow to rename VCAs in the editor

This commit is contained in:
Robin Gareus 2017-07-28 02:12:19 +02:00
parent d67056562b
commit a3dd948c02
4 changed files with 11 additions and 1 deletions

View File

@ -619,7 +619,7 @@ TimeAxisView::begin_name_edit ()
}
Gtk::Window* toplevel = (Gtk::Window*) control_parent->get_toplevel();
FloatingTextEntry* fte = new FloatingTextEntry (toplevel, name_label.get_text ());
FloatingTextEntry* fte = new FloatingTextEntry (toplevel, name ());
fte->set_name ("TrackNameEditor");
fte->use_text.connect (sigc::mem_fun (*this, &TimeAxisView::end_name_edit));

View File

@ -257,6 +257,7 @@ class TimeAxisView : public virtual AxisView
void begin_name_edit ();
void end_name_edit (std::string, int);
virtual std::string name () const { return name_label.get_text (); }
/* derived classes can override these */

View File

@ -210,6 +210,13 @@ VCATimeAxisView::update_vca_name ()
name_label.set_text (_vca->full_name());
}
bool
VCATimeAxisView::name_entry_changed (std::string const& str)
{
_vca->set_name (str);
return true;
}
void
VCATimeAxisView::update_mute_display ()
{

View File

@ -78,6 +78,8 @@ protected:
virtual void build_automation_action_menu (bool);
Gtk::Menu* automation_action_menu;
bool name_entry_changed (std::string const&);
void parameter_changed (std::string const& p);
void vca_property_changed (PBD::PropertyChange const&);
void update_vca_name ();